Competitive Programming600 points

Released at: 2021/03/03

Can you hack* beginner competitive programmer's code for the following problem?

* In a context of competitive programming, "hack" is to submit an input for other competitor's code. If your input comply with the constraints and other competitor's code make a wrong output for your input, you will get additional points. This is a CTF, not a competitive programming.

Mirror

We say strings A and B are mirror if A=rev(B). Formally, strings A and B are mirror if and only if |A|=|B|=n and A[j]=B[n-j-1] for 0<=i<n. Decide that strings are mirror or not. You are given N cases. Solve each of them.

Constraints

  • 1<=N<=10
  • 1<=ni<=10,000
  • |Ai|=|Bi|=n
  • Ai and Bi consist of lowercase English letters.

Input

Input is given in the following format:

N
n0 A0 B0
n1 A1 B1
 :
n1 AN-1 BN-1

Output

For each case, output mirror if they are mirror; output no if they are not.

Sample Input

3
4 flag galf
4 flag flag
1 a a

Sample Output

mirror
no
mirror

nc ctfq.u1tramarine.blue 10037
ncat --ssl ctfq.u1tramarine.blue 20037

To end an input and keep reading an output, you have to "half-close" the connection. One way to do so is socat. Example:

$ cat input.txt
3
4 flag galf
4 flag flag
1 a a
$ cat input.txt | socat - TCP:ctfq.u1tramarine.blue:10037
Your input:
Output:
mirror
no
mirror

Your hack was unsuccessful...
mirror's output is correct.

Outbound packets are filterd. You cannot use reverse shells.

The flag is /home/q37/flag.txt