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

13837번 - Hyper Rock-Scissors-Paper 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
8 초 (추가 시간 없음) 512 MB52250.000%

문제

Rock-Scissors-Paper is a game played with hands and often used for random choice of a person for some purpose. Today, we have got an extended version, namely, Hyper Rock-Scissors-Paper (or Hyper RSP for short).

In a game of Hyper RSP, the players simultaneously presents their hands forming any one of the following 15 gestures: Rock, Fire, Scissors, Snake, Human, Tree, Wolf, Sponge, Paper, Air, Water, Dragon, Devil, Lightning, and Gun.


Figure 1: Hyper Rock-Scissors-Paper

The arrows in the figure above show the defeating relation. For example, Rock defeats Fire, Scissors, Snake, Human, Tree, Wolf, and Sponge. Fire defeats Scissors, Snake, Human, Tree, Wolf, Sponge, and Paper. Generally speaking, each hand defeats other seven hands located after in anti-clockwise order in the figure. A player is said to win the game if the player’s hand defeats at least one of the other hands, and is not defeated by any of the other hands.

Your task is to determine the winning hand, given multiple hands presented by the players.

입력

The input consists of a series of data sets. The first line of each data set is the number N of the players (N < 1000). The next N lines are the hands presented by the players.

The end of the input is indicated by a line containing single zero.

출력

For each data set, output the winning hand in a single line. When there are no winners in the game, output “Draw” (without quotes).

제한

예제 입력 1

8
Lightning
Gun
Paper
Sponge
Water
Dragon
Devil
Air
3
Rock
Scissors
Paper
0

예제 출력 1

Sponge
Draw

힌트

출처

Contest > ICPC Japanese Alumni Group > JAG Practice Contest for ICPC Asia Regional > JAG Practice Contest 2006 B번

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

출처

대학교 대회

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

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