Decypher the String
Contest: Educational Codeforces Round 60 (Rated for Div. 2)
Difficulty rating: 2200
Tags: bitmasks, chinese remainder theorem, constructive algorithms, interactive, math

This is an interactive problem. Remember to flush your output while communicating with the testing program. You may use fflush(stdout) in C++, system.out.flush() in Java, stdout.flush() in Python or flush(output) in Pascal to flush the output. If you use some other programming language, consult its documentation. You may also refer to the guide on interactive problems: https://codeforces.com/blog/entry/45307.

You are given a string $$$t$$$ consisting of $$$n$$$ lowercase Latin letters. This string was cyphered as follows: initially, the jury had a string $$$s$$$ consisting of $$$n$$$ lowercase Latin letters. Then they applied a sequence of no more than $$$n$$$ (possibly zero) operations. $$$i$$$-th operation is denoted by two integers $$$a_i$$$ and $$$b_i$$$ ($$$1 \le a_i, b_i \le n$$$), and means swapping two elements of the string with indices $$$a_i$$$ and $$$b_i$$$. All operations were done in the order they were placed in the sequence. For example, if $$$s$$$ is xyz and $$$2$$$ following operations are performed: $$$a_1 = 1, b_1 = 2$$$; $$$a_2 = 2, b_2 = 3$$$, then after the first operation the current string is yxz, and after the second operation the current string is yzx, so $$$t$$$ is yzx.

You are asked to restore the original string $$$s$$$. Unfortunately, you have no information about the operations used in the algorithm (you don't even know if there were any operations in the sequence). But you may run the same sequence of operations on any string you want, provided that it contains only lowercase Latin letters and its length is $$$n$$$, and get the resulting string after those operations.

Can you guess the original string $$$s$$$ asking the testing system to run the sequence of swaps no more than $$$3$$$ times?

The string $$$s$$$ and the sequence of swaps are fixed in each test; the interactor doesn't try to adapt the test to your solution.

Input format:
Initially the testing system sends one string $$$t$$$, consisting of lowercase Latin letters ($$$1 \le |t| = n \le 10^4$$$).

Output format:
To give the answer, your program should print one line $$$!$$$ $$$s$$$ with a line break in the end. After that, it should flush the output and terminate gracefully.

Interaction format:
Before giving the answer, you may submit no more than $$$3$$$ queries. To ask a query, print one line in the following format: $$$?$$$ $$$s'$$$, where $$$s'$$$ should be a string consisting of exaclty $$$n$$$ lowercase Latin letters. The line should be ended with a line break character. After submitting a query, flush the output and read the answer to your query — a string $$$t'$$$ consisting of $$$n$$$ lowercase Latin letters, which is the result of applying the sequence of swaps to string $$$s'$$$. This string will be given on a separate line ended by a line break character.

If you submit an incorrect query (or ask more than $$$3$$$ queries), the answer to it will be one string 0. After receiving such an answer, your program should terminate immediately — otherwise you may receive verdict "Runtime error", "Time limit exceeded" or some other verdict instead of "Wrong answer".

Constraints:
Time limit: 2.0 s
Memory limit: 256.0 MB

Note:
In the sample, the testcase described in the statement is used. The participant asks the first query with string baa, which is transformed to aab. The second query contains string aba, which is transformed to baa. The third query contains string aab, which is transformed to aba. The participant can deduce that the initial string $$$s$$$ was xyz.

Note for hacking phase:

To submit a test in hacking phase, you should provide it in the following format:

The first line should contain the string $$$s$$$ you guess, consisting of $$$n \in [1, 10000]$$$ lowercase Latin letters.

The second line should contain $$$k$$$ ($$$0 \le k \le n$$$) — the number of swap operations in the sequence.

Then $$$k$$$ lines should follow, $$$i$$$-th of them should denote $$$i$$$-th operation with two integers $$$a_i$$$ and $$$b_i$$$ ($$$1 \le a_i, b_i \le n$$$).

For example, the sample test would look like that:

xyz

2

1 2

2 3

Example input:
yzx
aab
baa
aba

Example output:
? baa
? aba
? aab
! xyz

Editorial:
Since a sequence of swaps denotes some permutation, let's try to restore the permutation $$$p$$$ that was used to transform $$$s$$$ into $$$t$$$, and then get $$$s$$$ by applying inverse permutation.
If $$$n$$$ was $$$26$$$ or less, then we could get $$$p$$$ just by asking one query: send a string where no character occurs twice, and the resulting positions of characters uniquely determine the permutation. Unfortunately, $$$n$$$ may be greater than $$$26$$$ — but we can ask more than one query.
The main idea is the following: for each index $$$i \in [1, n]$$$, we may choose a triple of characters, so all triples are distinct. There are $$$26^3$$$ different triples, and that's greater than $$$10^4$$$, so each index can be uniquely determined. Then, after we choose a triple for each index, ask three queries as follows: in the first query, the $$$i$$$-th character of the string is the first character in the triple representing index $$$i$$$; in the second query we use the second characters from all triples, and in the third query — the third characters. Let $$$s_1$$$, $$$s_2$$$ and $$$s_3$$$ be the strings we sent, and $$$t_1$$$, $$$t_2$$$ and $$$t_3$$$ be the strings we received as answers. The permutation maps index $$$i$$$ to index $$$j$$$ if and only if $$$s_1[i] = t_1[j]$$$, $$$s_2[i] = t_2[j]$$$ and $$$s_3[i] = t_3[j]$$$ — because if some other index is mapped to $$$j$$$, then at least one of the aforementioned equalities is false since all triples of characters are distinct. Using this fact, we may recover the permutation $$$p$$$.