Fischer's Chess Guessing Game

시간 제한2초메모리 제한2048 MB

문제

This is an interactive problem.

Fischer's Chess is a game in which the starting position is randomly chosen from 960 positions. The starting position satisfies the following requirements:

  • The white pieces are shuffled (the king, queen, two rooks, two bishops, and two knights are placed on the first rank).
  • The black pieces are placed on the eighth rank in the same order as the white pieces.
  • The king is placed between the two rooks (there may be other pieces between the king and rooks). This is necessary for castling rule.
  • The white bishops are placed on opposite-colored squares. In other words, one bishop is on a square of even file, and the other is on a square of odd file.

Jill has chosen one of the starting positions. Jack's task is to guess it. Jack places any legal starting position on the chessboard, and Jill tells him how many of the white pieces he has placed correctly. Your task is to help Jack guess the position by placing no more than six positions.