Yo`nalishlar
Hozirda online

Statistika

Masalalar soni: 909

Foydalanuvchilar soni: 8824

Jo'natishlar soni: 714622

Muhokama yozuvlari: 4541

Yangiliklar soni: 98

Yangiliklar izohlari: 1177


So'ngi izohlar

771. Crosses and Crosses
Vaqt limiti: 1 sekund
Xotira limiti: 64 MB

The game of Crosses and Crosses is played on the field of 1 × n cells. Two players make moves in turn. Each move the player selects any free cell on the field and puts a cross × to it. If after the players move there are three crosses in a row, he wins and the game stops.

You are given a position in the game. Find out, who has won the game.

Input

The input file contains one line containing only characters x (ASCII code 120) denoting crosses and . (ASCII code 46) denoting empty cells. The number of cells in the given position does not exceed 30.

Output

The first line of output file should contain one of the following strings:

First, if the first player has won the game;

Second, if the second player has won the game;

Nobody, if nobody has won yet;

Invalid, if the position is invalid, i.e. it could not have been reached in a correctly played game.

Samples

Input

Output

1

x.xxx.x

First

2

xxxxxxxx

Invalid

 

Tayyorladi: Azat Yusupov
Text from: Uzbekistan subregional
Mening urinishlarim(0) Muhokama (18) Jo'natish Eng yaxshi yechimlar Barcha muvaffaqiyatli urinishlar(37) Barcha urinishlar(168)