Game of Tic-Tac-Toe

Limits 1s, 512 MB

Alice and Bob is a playing a game of tic-tac-toe, to be precise a variant of tic-tac-toe called Notakto. In a game of Notakto, there will always be a winner.

Notakto is played on 3×3 tic-tac-toe board with both players playing X. A game ends when the board contains three consecutive X, at which point the player to have made the last move loses the game.

Given a configuration of the board, you have to find out the winner. Alice always makes the first move.

Input

You are given an integer n (0 < n < 200), number of games.

For each game, you are given a 3×3 grid, each grid cell is empty (denoted by dot), or occupied by a cross (denoted by X).

Output

For each game, print the winner of that game, in the format "Game #x: winner". Here, x is the game number.

Samples

InputOutput
1
.X.
.X.
..X
Game #1: Bob
InputOutput
2
.X.
.XX
X.X
...
.XX
...
Game #1: Bob
Game #2: Alice