Under construction

Still being built. Things may change

Team Division

Time limit1sMemory limit1024 MB

Summary
Given N up to 10^18, each newbie joins the team that is winning at that moment; print the team that wins after all N have joined.
Level

Medium5 of 10

Topics
Math, Simulation, Implementation
Solved
No attempts yet

Statement

The game Encounter Incredible: Online has three teams: mages, archers, and knights. In combat:

  • mages have an advantage over knights;
  • archers have an advantage over mages;
  • knights have an advantage over archers.

All players have exactly the same skill level, so the result depends only on how many people are in each team. If the game has aa mages, bb archers, and cc knights, then:

  • mages get c−b+0.1c - b + 0.1 points;
  • archers get a−c+0.2a - c + 0.2 points;
  • knights get b−a+0.3b - a + 0.3 points.

The team with the most points wins.

NN newbies join the game one at a time. Each one must choose a team when joining. They can see how many people each team already has, so they can work out which team would win if the game started without them, and they join that team.

Find which team wins after all NN newbies have joined.

Input

The input file contains one integer NN (1≤N≤10181 \le N \le 10^{18}), the number of players.

Output

Print the name of the winning team: maagid, vibulaskjad, or ryytlid (without quotes).

Examples5

  1. Example 1

    Input
    2
    
    Expected output
    maagid
    
  2. Example 2

    Input
    4
    
    Expected output
    vibulaskjad
    
  3. Example 3

    Input
    12
    
    Expected output
    maagid
    
  4. Example 4

    Input
    314159265
    
    Expected output
    ryytlid
    
  5. Example 5

    Input
    123456789123456789
    
    Expected output
    ryytlid