Under construction

Still being built. Things may change

Stairs to the Kimbap Heaven

Interview

Time limit1sMemory limit512 MB

Summary
Given N and K, decide whether Minhee can reach stair N in exactly K actions when tapping stair i moves Minhee to stair i + floor(i/2).
Level

Medium5 of 10

Topics
BFS, Shortest path
Solved
No attempts yet

Problem

Minhee wants to go to a heaven famous for its mini kimbap.

At the gate of heaven there are infinitely many stairs. The bottom stair is numbered 0, and the numbers increase by 1 as you go up. A kimbap shop is next to the NN-th stair.

Minhee can take a total of KK actions, choosing one of the following two actions each time. If Minhee reaches the NN-th stair exactly at the KK-th action, Minhee can eat mini kimbap.

  1. Climb up one stair.
  2. Tap the staff brought from home on the stair. If Minhee taps the staff on the ii-th stair, Minhee teleports to the ⌊i2⌋\left \lfloor \cfrac{i}{2} \right \rfloor stair above, that is, the i+⌊i2⌋i +\left \lfloor \cfrac{i}{2} \right \rfloor-th stair.

Minhee is currently on the 0th stair. Find out whether Minhee can eat mini kimbap.

Input

The first line contains the number of stairs NN and the number of climbing actions KK. (1≤N,K≤1 000 000)(1 \leq N, K \leq 1\,000\,000)

Output

If Minhee can eat mini kimbap by climbing the NN stairs in exactly KK actions, print minigimbob. Otherwise, if Minhee can only drink water, print water.

Hint

⌊x⌋\left \lfloor x \right \rfloor is the largest integer less than or equal to xx.

Examples2

  1. Example 1

    Input
    5 2
    
    Expected output
    water
    
  2. Example 2

    Input
    42 10
    
    Expected output
    minigimbob