Logo
(追記) (追記ここまで)

3754번 - John 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB138665948.361%

문제

Little John is playing very funny game with his younger brother. There is one big box filled with M&Ms of different colors. At first John has to eat several M&Ms of the same color. Then his opponent has to make a turn. And so on. Please note that each player has to eat at least one M&M during his turn. If John (or his brother) will eat the last M&M from the box he will be considered as a looser and he will have to buy a new candy box.

Both of players are using optimal game strategy. John starts first always. You will be given information about M&Ms and your task is to determine a winner of such a beautiful game.

입력

The first line of input will contain a single integer T – the number of test cases. Next T pairs of lines will describe tests in a following format. The first line of each test will contain an integer N – the amount of different M&M colors in a box. Next line will contain N integers Ai, separated by spaces – amount of M&Ms of i-th color.

  • 1 <= T <= 474,
  • 1 <= N <= 47,
  • 1 <= Ai <= 4747

출력

Output T lines each of them containing information about game winner. Print “John” if John will win the game or “Brother” in other case.

제한

예제 입력 1

2
3
3 5 1
1
1

예제 출력 1

John
Brother

힌트

출처

ICPC > Regionals > Europe > Southeastern European Regional Contest > SEERC 2007 A번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /