Farmer John has purchased a subscription to Good Hooveskeeping magazine for his cows, giving them plenty of material to read while they wait 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 occurrences of a substring 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 there are no more occurrences of in . 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.
The first line contains the string . The second line contains the string . The length of is at most characters and at most the length of . All characters in both and are lowercase English letters (in the range ).
Print the string after all deletions are complete. It is guaranteed that will not become empty during the deletion process.
Example 1