QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 1024 MB

# 3698. Censor

统计

frog is now a editor to censor so-called sensitive words (敏感词).

She has a long text $p$. Her job is relatively simple -- just to find the first occurence of sensitive word $w$ and remove it.

frog repeats over and over again. Help her do the tedious work.

Input

The input consists of multiple tests. For each test:

The first line contains $1$ string $w$. The second line contains $1$ string $p$.

($1 \leq \textrm{length of}\ w, p \leq 5 \cdot 10^6$, $w, p$ consists of only lowercase letter)

Output

For each test, write $1$ string which denotes the censored text.

Sample Input

abc
aaabcbc
b
bbb
abc
ab

Sample Output

a

ab