Bug Catcher

No attempts yetTime limit1sMemory limit128 MB

Problem

Not every bug is an insect. Some bugs are a developer's nightmare — the kind people mean when they say "a bug was found in the program you wrote." And as you know, no matter how many you remove, more keep appearing.

Recently a rather handy tool called "Bug Catcher" appeared. It finds and removes every bug in your source code. Your job is to implement this "Bug Catcher": given the source code, keep deleting the string that represents a bug until none remain.

Input

The input consists of several test cases and continues until the end of the file.

Each test case begins with one line containing an integer $T$ ($0 \le T \le 100,000$), a single space, and a string $B$ that represents a bug. The next $T$ lines each contain one line of source code from which bugs must be removed.

Each source-code line has length between $0$ and $2,000,000$ characters. The bug string $B$ consists of $1$ to $1000$ uppercase English letters. Matching is case-sensitive: only substrings exactly equal to $B$ count as bugs.

Output

For each source-code line, repeatedly delete the first occurrence of $B$ until $B$ no longer appears, and print the resulting line.

No bug may remain in the output. Every other character, including whitespace, must be printed exactly as it appeared in the input.