|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||64 MB||43||1||1||2.326%|
Your task is to clean all the mess (the list of the forbidden words) in your room (text string).
Write a program, which removes all occurences of the strings Ni from the string P. More precisely defined, until P contains some of the strings Ni, you should take the shortest prefix of P, which contains some of the strings Ni and delete the shortest string from Ni that this prefix contains.
On the first line, there is one string P, which consits of the digits and lower and upper case of the english alphabet. The length of P is at most 105. On the remaining lines of the input, there is always exactly one string Ni, which consints of the digits and lower and upper case of the english alphabet. The overall length of all the strings Ni is also at most 105.
On the only line of the output, write the rest of P after removing all Ni . You can assume, that the length of the rest of P will be always at least 1.
0001 00 000