HUST 2016招新选拔

From: 2016-03-06 14:00:00 To: 2016-03-06 17:30:00 Now: 2017-09-24 21:47:58 Status: Public

H - Card Problem

Time Limit: 1s Memory Limit: 512MB

Submissions: 15 Solved: 1
Description

Thulium and Chichu are good friends with OldUncle and they like playing cards. There is a game called Three cards. That is to say, all of the players will get three cards.

Each card has one of four kinds and a value:

· kinds:(C)♣,(D)♦,(H)❤ and (S)♠. They have no order.

· values:A>K>Q>J>10(T)>9>8>7>6>5>4>3>2. 

The cards can be one of six types:

1)Plane:the values of three cards are same

like: TH TS TC, 5C 5H 5S

2)Tong Hua:the kinds of three cards are same, and the values of them are continuous

like:7D 8D 9D, TS JS QS

3) Jin Hua:the kinds of three cards are same 

4) Shun Zi:the values of three cards are continuous

5) Dui Zi:the values of two cards are same

6) Other:the other situation

The order:Plane > Tong Hua > Jin Hua > Shun Zi > Dui Zi > Other.

If the types of players is the same one, the values will be considered.

If Dui Zi is the same type, we will compare the value which belongs to the same cards firstly.

For example, 6C 6D 7D > 5C 5S 9D, 6C 6D 7D >6S 6H 5D.

Else,we compare the value from the biggest to the smallest.

For example, KS 9C 8C < AH 5D 4D

If all values of the cards are same, they can’t be compared.

5C 6C 7C = 5D 6D 7D.

 

Input

The input contains several test cases, each test case will have only one line. There are six cards in a line, first three for Thulium and the other for Chichu. There are two parts of each card, first represents the value and last represents the kind.

Output

For each test case, output a line containing the result of the game. If Thulium’s cards is bigger than Chichu's, output "Thulium wins!", if Chichu's cards is bigger than Thulium's, output "Chichu wins!", if they tied, output "Who wins God knows!"

Sample Input
AC AD AH KC KD KH
TD QD JD QC KC JC
2D 2C 5S 2S 2H 5C
Sample Output
Thulium wins!
Chichu wins!
Who wins God knows!
Hint
Source