2167: 「一本通 2.2 练习 4」Censoring

Memory Limit:512 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

**原题来自:USACO 2015 Feb. Silver** 给出两个字符串 $S$ 和 $T$,每次从前往后找到 $S$ 的一个子串 $A=T$ 并将其删除,空缺位依次向前补齐,重复上述操作多次,直到 $S$ 串中不含 $T$ 串。输出最终的 $S$ 串。

Input

第一行包含一个字符串 $S$,第二行包含一个字符串 $T$。

Output

输出处理后的 $S$ 串。

Sample Input Copy

whatthemomooofun
moo

Sample Output Copy

whatthefun

HINT


数据范围:对于全部数据,$1\le |T|\le |S|\le 10^6$,保证字符串中只出现小写字母。