시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
5 초 128 MB 7 0 0 0.000%

문제

상근이는 정인이와 체스를 두려고 한다. 그런데 흰색 킹을 잃어버린 바람에, 상근이와 정인이는 자신들만의 형태의 체스를 하기로 했다. 상근이에게는 룩(♖) 두 개(여기서 룩은 가로, 세로로 움직일 수 있다)가 있고, 정인이에게는 왕(♚)만 남아 있다. 지금은 상근이의 차례이다. 상근이는 체크메이트를 만들어 정인이를 이기려고 한다. 정인이가 가장 나은 수를 둘 때, 상근이가 이기는 데 걸리는 최소 횟수를 구하는 프로그램을 작성하여라.

 다음을 참고하시오.

  1. 위에서 설명된 상황은 실제 체스에서는 불가능하다. 대신 이것을 제외한 나머지 모든 상황은 체스의 규칙에 따른다.
  2. 체스판은 8 x 8 사이즈로, 가로줄은 1~8로 나타내고, 세로줄 번호는 a~h로 나타낸다.
  3. 이 프로그램에서는 상근이(백)의 말 움직임 횟수만 센다.
  4. 룩은 앞서 말했듯이 가로와 세로로 움직일 수 있다. 하지만 다른 룩을 넘어갈 수는 없다.
  5. 체크는 왕을 잡을 수 있는 위치로 백 룩이 움직이는 것을 말한다.
  6. 킹은 어느 방향이로든지 한 칸씩만 움직일 수 있지만, 킹이 움직이면 죽는 자리로는 갈 수 없다.
  7. 체크메이트는 왕이 어느 곳으로 가든 백 룩에 의해 죽을 수밖에 없는 상황을 말한다.
  8. 이 밖에도 스테일메이트라는 상황이 있는데, 스테일메이트는 왕이 체크를 당한 상황은 아니지만, 어떤 경우에라도 움직이게 되면 체크를 불리어 말을 움직일 수 없는 경우를 나타낸다. 이 경우에는 무승부가 된다.

입력

입력의 첫 줄에는 테스트 케이스가 주어진다.

각 테스트 케이스의 입력은 한 줄로 이루어져 있고, 각각 정인이의 킹의 위치와 상근이의 두 룩의 위치로 이루어져 있다. 같은 위치에 있는 두 말은 존재하지 않는다. 또한, 입력에서 들어오는 상황은 흑 킹이 처음부터 체크를 불리우는 상황이 아니다.

출력

상근이가 이기기 위한 최소 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