Under construction

Still being built. Things may change

in-out? out-in? stairs? reverse?

Interview

Time limit1sMemory limit1024 MB

Summary
Given a string that is a permutation of the eight keys a s d f j k l ;, decide whether it is in-out, out-in, stairs, reverse, or none of these.
Level

Easy2 of 10

Topics
Implementation, String
Solved
No attempts yet

Problem

Players of rhythm games at Daesogo use different typing styles.

The styles are in-out, out-in, stairs, and reverse.

StyleDescriptionString
in-outTypes keys in order from the index finger to the little finger.fdsajkl; or jkl;fdsa
out-inTypes keys in order from the little finger to the index finger.asdf;lkj or ;lkjasdf
stairsTypes keys in order from the left little finger to the right little finger.asdfjkl;
reverseTypes keys in order from the right little finger to the left little finger.;lkjfdsa

One day, a Daesogo friend turned on a computer and left some characters in Notepad.

asdfjkl;

changwook987, who often plays rhythm games, noticed that the friend who wrote in Notepad used the stairs style.

changwook987 became interested in the typing styles of friends, so asked another friend to type in Notepad using that friend's own style.

Given the characters that the other friend typed, determine which style was used.

Input

A string SS of length 8 is given. Each of the characters a, s, d, f, j, k, l, and ; appears exactly once in SS.

Output

If the input is in-out, print in-out.

If the input is out-in, print out-in.

If the input is stairs, print stairs.

If the input is reverse, print reverse.

If the input is none of these four styles, print molu.

Examples5

  1. Example 1

    Input
    fdsajkl;
    
    Expected output
    in-out
    
  2. Example 2

    Input
    asdf;lkj
    
    Expected output
    out-in
    
  3. Example 3

    Input
    asdfjkl;
    
    Expected output
    stairs
    
  4. Example 4

    Input
    ;lkjfdsa
    
    Expected output
    reverse
    
  5. Example 5

    Input
    ajskdlf;
    
    Expected output
    molu