Problem D. Guess the String

I have a 01 string S whose length is between 1 and 100 (inclusive). Your task is to guess it.

Each time you can give me a 01 string and I'll tell you whether it's a continuous substring of S.

Interaction Protocol

Your program should read from standard input, and write to standard output. After printing each line to the standard output, you should flush the output, by calling fflush(stdout) or cout << flush in C/C++, flush(output) in Pascal and System.out.flush() in Java. Please read general instructions for interactive problems for more information.

First, read the number of test cases T(1<=T<=100). For each test case, issue one or more Ask command, followed by an Answer command.

CommandDescription
Ask tReturns 1 if t is a substring of S, otherwise returns 0. The length of string t should be between 1 and 100 (inclusive).
Answer STell us your answer. This command does not return anything.

If your program violated any of these rules (bad format, invalid arguments etc), the server will exit immediately, and you will receive Protocol Violation (PV).

Protocol Limit

For each test case, you can issue at most 222 Ask commands, otherwise you'll get Protocol Limit Exceeded (PLE).

Sample Interaction

1
           Ask 010
1
           Ask 101
1
           Ask 100
0
           Answer 0101

Rujia Liu's Present 7: Hello, Interactive Problems!
Classic Problem
Adapted by Rujia Liu
Special Thanks: Md. Mahbubul Hasan