409575: GYM103637 C Crossed out letter

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

C. Crossed out lettertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Consider string $$$s$$$. Let's call $$$s$$$ with some single character removed – $$$s_0$$$, and without some, possibly another, character – $$$s_1$$$. You are given $$$s_0$$$ and $$$s_1$$$, find any suitable string $$$s$$$ or determine, that there are none.

Input

The first line of the input data contains one string $$$s_0$$$ consisting of lowercase English letters.

The second line of the input data contains one string $$$s_1$$$ consisting of lowercase English letters.

$$$$$$ 1 \le |s_0|, |s_1| \le 3 \cdot 10^5 $$$$$$

$$$$$$ |s_0| = |s_1| $$$$$$

Output

Print a single line $$$s$$$ consisting of lowercase English letters or "IMPOSSIBLE" (in capital letters, without quotes).

ExamplesInput
abacaa
aacaba
Output
abacaba
Input
bsuir
openx
Output
IMPOSSIBLE
Note

In the first test case, removing from "abacaba" second character "b" we get $$$s_0=$$$"abacaa", and removing "abacaba" first character "b", we get $$$s_1=$$$"aacaba".

In the second test case there isn't any string $$$s$$$.

加入题单

上一题 下一题 算法标签: