#ADAQUBIC. Ada and TicTacToe

    ID: 3655 远端评测题 2000ms 1536MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>dynamic-programminggame-theory-1optimization

Ada and TicTacToe

Ada the Ladybug was playing 3D Tic-Tac-Toe against her good friend Velvet Mite Vinit. They were playing on 3x3x3 field. Sadly, Vinit had to go home earlier so the game was left unfinished. Ada wants to know who would win the match (if they both played optimally). You also know that Ada started.

Input

The first line contains a single integer 1 ≤ T ≤ 1000, number of test-cases.

Each test-case will contain 9 lines with three character each, representing the field ('.' for empty place, 'x' for move of Ada and 'o' for move of Vinit). You are assured that the game is unfinished and valid.

First three lines represent the top field, the next three lines represent middle field and the last three lines represent the bottom field.

There will be a blank line before each test-case.

Output

For each test-case, print the name of winner (Ada or Vinit);

Example Input

7

..o o.x xox x.x ... x.o ... o.o .x.

.x. ... ..o o.x x.. ..o ..x ... ...

o.. ... o.x .x. ... .x. o.o .xx oox

..x ..x .o. ..x ..x xo. o.. ..o ...

... ..x ..x .o. ..x o.. ... ... x.o

... ..x ..o ... ... xo. ox. ... .ox

o.. x.. ... oxx ..o .ox ..o .x. .x.

</p>

Example Output

Vinit
Vinit
Ada
Vinit
Ada
Vinit
Vinit

Example Input 2

1

xox x.o oox o.o x.x xxo x.o oxo ox.

</p>

Example Output 2

Ada