#P1080. 「字符串」Censoring「Bzoj3942」

「字符串」Censoring「Bzoj3942」

Description

给出两个字符串 S 和 T,长度均小于10^6,每次从前往后找到 S 的一个子串 A=T 并将其删除,空缺位依次向前补齐,重复上述操作多次,直到 S 串中不含 T串。输出最终的 S 串。

Input Format

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

Output Format

输出处理后的 S 串。

Sample

输入示例
whatthemomooofun
moo
输出示例
whatthefun

Hint

对于全部数据,1≤∣T∣≤∣S∣≤10^6,保证字符串中只出现小写字母。