Under construction

Still being built. Things may change

Who Is the Winner of This Area?!

Interview

Time limit1sMemory limit1024 MB

Summary
Map each letter of a string to its stroke count, repeatedly sum adjacent pairs modulo 10, and report whether the final single value is odd.
Level

Easy3 of 10

Topics
Simulation, Implementation, Math, Array
Solved
No attempts yet

Problem

Hwang Tollik, a student in the Department of Computer and Information Engineering at the Catholic University of Korea, made a game for friends who were sad because of COVID.

When the game starts, a string consisting only of uppercase letters is given. Each character is converted into the number of strokes needed to write it. Starting from the front, the strokes are added two at a time; if a number cannot be paired, it passes to the next step unchanged. From the next step on, the same process repeats on the numbers produced by adding two at a time in the previous step. This repeats until one number remains. If that number is odd, you win; if it is even, you lose.

For example, if the string "ABCDE" is given, the characters 'A', 'B', 'C', 'D', 'E' are converted to their stroke counts 3, 2, 1, 2, 3, and the process proceeds as in the figure below. When adding, if the sum exceeds 10, it is replaced by the remainder modulo 10.

'E' cannot be paired, so 3 carries straight down. The last remaining number is 1, which is odd, so this game is won.

Tollik, who serves as the referee, finds computing this every time annoying and wants to write code for it. Help Tollik write the code.

The stroke counts of uppercase letters are given in the table below.

ABCDEFGHIJKLMNOPQRSTUVWXYZ
32123333113133122212112221

Input

The first line gives a string S consisting only of uppercase letters, with length K. (1 ≤ K ≤ 1,000,000)

Output

Print the answer on the first line.

If the last remaining number is odd, print "I'm a winner!"; if it is 0 or even, print "You're the winner?".

Examples2

  1. Example 1

    Input
    ABCDE
    
    Expected output
    I'm a winner!
    
  2. Example 2

    Input
    AECF
    
    Expected output
    You're the winner?