Censoring (Bronze)#11176

Censoring (Bronze)

1 second
128 megabytes
Medium

Farmer John has purchased a subscription to Good~Hooveskeeping magazine for his cows, so they have plenty of material to read while waiting in the barn during milking sessions. Unfortunately, the latest issue contains a rather inappropriate article about how to cook the perfect steak, which FJ would rather his cows not see. Clearly, the magazine is in need of better editorial oversight.

FJ has extracted all of the text from the magazine into a string of length at most 10^6 characters. He wants to remove all occurrences of a substring of length at most characters in order to censor the inappropriate content.

To do this, Farmer John repeatedly finds the occurrence of in and deletes it. He continues this process until contains no occurrences of . Note that deleting one occurrence of may create a new occurrence of that did not exist before.

Please help FJ determine the final contents of after the censoring process is complete.

Input

The first line contains the string . The second line contains the string . The length of is at most the length of , and all characters in both and are lowercase English letters (in the range ..).

Output

Print the string after all deletions have been performed. It is guaranteed that will not become empty during the deletion process.

Examples

Example 1

Loading
Loading