This page is still under construction.

Parts of this page are still being built. What you see may change.

Card Cutting

Time limit1sMemory limit128 MB

Summary
Read each game line of card values up to '*', count odd values for Cheryl and even values for Tania, and print the winner or Draw.
Level

Easy2 of 10

Topics
Implementation, String, Brute force
Solved
No attempts yet

Problem

Cheryl and Tania often play a simple card cutting game. They first remove all the picture cards (Jack, Queen, King), then take turns cutting the pack. Every time a card turns up, Cheryl scores a point if its value is odd, and Tania scores a point if its value is even. When they get fed up, they add up their points.

Input

The input contains data for several games. Each game is given on a single line as a list of card values separated by single spaces. A represents an Ace and counts as 11. The highest card value is 1010. The last token on each line is a *, which marks the end of that game and must not be processed as a card.

The input is terminated by a line containing just a #; that line must not be processed.

Output

For each game, print a single line with the name of the winner, Cheryl or Tania. If both girls score the same number of points, print Draw instead.

Hint

In the first game Cheryl scores 66 points for A, 3, A, 3, A and 5, while Tania scores 33 points for 2, 8 and 10.

In the second game Cheryl scores 44 points for 9, 3, 3 and 7, and Tania also scores 44 points for 2, 4, 6 and 8, so the game is a draw.

Examples3

  1. Example 1

    Input
    A 2 8 3 10 A 3 A 5 *
    2 4 9 3 6 3 7 8 *
    #
    
    Expected output
    Cheryl
    Draw
    
  2. Example 2

    Input
    2 4 6 8 *
    #
    
    Expected output
    Tania
    
  3. Example 3

    Input
    A 3 5 7 9 *
    #
    
    Expected output
    Cheryl