Censoring

No attempts yetTime limit1sMemory limit256 MB

Problem

Farmer John subscribed to a magazine so that his cows have something to read while they wait during milking. The latest issue carries an article on how to cook the perfect steak, and John would rather his cows never see it.

John took every character of the magazine and joined it into one string SS of length at most 10610^6. He now wants to censor the text by deleting the places where a string TT of length at most 100100 appears. The procedure is this. Find the first occurrence of TT in SS and delete it. Repeat, deleting the first occurrence of TT each time, until TT no longer appears in SS. A deletion joins the two halves around it, so an occurrence of TT that was not there before can appear.

Determine what SS is once the censoring is finished.

Input

The first line contains the string SS. The second line contains the string TT. The length of TT is at most the length of SS, and both SS and TT consist only of lower case letters a to z.

Output

Print the string SS after all deletions are finished. SS never becomes empty during the process.