12987 - Let's build a hacker script   

Description

As a student studying in computer science,

your parents and your friends always think of you as a hacker.

 

To impress them, you want to build a hacker script.

After several days of scripting, you finally got the system's administration password.

 

But the system has a protection mechanism,

which replace some consecutive letters into a '#' character as the system settings.

After that, there may be one or more '#' character,

and each '#' character represent one to many arbitary letters.

 

To get the whole control of the system,

you must know the exactly characters replaced by each '#' character.

 

Now, your goal is to print all possible combinations of each '#' character.

For the output order, please refer to the sample I/O.

 

The output order is also formally defined as follows.

Assume that the password you get is a string S,

and S[L, R] represent the substring from Lth character to the Rth character of string S.

For any 2 possible combinations A and B,

if the ith '#' in combination A replaced S[ALi, ARi] to '#',

the ith '#' in combination B replaced S[BLi, BRi] to '#',

and for the smallest i that ALi ≠ BLi and ARi ≠ BRi,

if ALi < BLi or (ALi = BLi and ARi < BRi),

then combination A should be output before combination B,

otherwise the combination B should be output before combination A.

If there is no any possible combinations,

output "What the hack!?" (without quotes).

 

ouo.

Input

Input contains 2 lines.

There first line contains a string S, represent the password of the system.

The second line contains a string P, represent the string you get after the protection mechanism replaced some character from S to '#'.

 

It is guaranteed that:

1 <= |S| <= 20, and S contains only lowercase letters,

1 <= |P| <= 20, and P contains only lowercase letters and at least 1 character '#'.

Output

If there is any possibles combination,

output one line per combination,

and separate the representation of each '#' by spaces.

Notice that the output order of combinations should follow the rules in the description.

 

If there is no any possible combination,

output "What the hack!?" (Without quotes)

Sample Input  Download

Sample Output  Download

Tags




Discuss