시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 235 99 78 53.425%

문제

흰 왕(Whiteking)과 검은 왕(Blackking)이 외나무다리 돌게임을 하려고 한다.

이 게임에서는 N개의 외나무다리를 사용한다. i번째 외나무다리는 일렬로 나열된 Ai개의 칸으로 이루어져 있다. 모든 외나무다리의 첫 번째 칸에는 흰 돌을 올려놓고, 마지막 칸에는 검은 돌을 올려놓고 게임을 시작한다.

각 턴에 왕은 자신의 색깔의 돌 중 하나를 이동시켜야만 한다. 이동시킬 때는 같은 다리의 다른 칸으로 돌을 움직여야 하며, 상대방의 돌을 뛰어넘거나, 같은 칸으로 이동할 수 없다. 이 조건을 어기지 않는 한, 자신의 돌을 두 돌이 멀어지는 방향으로 움직여도 된다. 번갈아 가면서 턴을 진행하며, 자신의 차례에 아무 돌도 움직일 수 없는 왕이 패배한다. 둘 다 최적의 방법으로 게임을 할 때, 누가 이길지 예측해보자!

입력

첫째 줄에는 외나무다리의 개수 N이 주어진다.  

둘째 줄에는 각 외나무다리의 칸 수 A1, A2, A3, ..., AN이 주어진다.

셋째 줄에는 먼저 시작하는 왕의 이름이 주어진다. 

출력

첫째 줄에 이길 왕의 이름을 출력한다. 이름은 항상 첫글자가 대문자임에 유의하여라.

제한

  • 1 ≤ N ≤ 100,000
  • 2 ≤ Ai ≤ 109

예제 입력 1

2
3 3
Whiteking

예제 출력 1

Blackking

예제 입력 2

2
3 5
Whiteking

예제 출력 2

Whiteking

힌트

길이 6짜리의 외나무다리에 흰 돌이 3번 칸에 있고, 검은 돌이 5번 칸에 있으면, 흰 돌은 1, 2, 4번 칸 중 하나로 이동할 수 있으며, 검은 돌은 4, 6번 칸 중 하나로 이동할 수 있다. 돌을 상대 돌로부터 멀어지는 방향으로 이동할 수 있음에 유의해라.

W3sicHJvYmxlbV9pZCI6IjE4OTM3IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjNjU1XHViNGU0XHVjNzU4IFx1YzY3OFx1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