PROG0430 - One-sided states

On the following keyboard - with layout as is common in the United States - the thick black line indicates which buttons are pressed with the left and which with the right one. The state of Texas is the only American state that you can type completely with your left hand on this keyboard, and the state of Ohio is the only one you can fully type with your right hand.

regular US keyboard
Keyboard layout as is common in the United States.

Based on this keyboard layout we divide words into the following four classes:

  • left-handed: words you can completely type with you left hand
  • right-handed: words you can completely type with you right hand
  • two-handed: words of which you can type the first or last letters with the one hand and the other letters with the other hand
  • no-handed: words not belonging to any of the previous classes

With this format, we do not distinguish between uppercase and lowercase letters, and only the letters of the word will be charged (all other characters are ignored).

Input

A single line that contains a word.

Output

The class to which the word from the input belongs: left-handed, right-handed, two-handed or no-handed.

Example

Input:

Texas

Output:

left-handed

Example

Input:

Ohio

Output:

right-handed

Example

Input:

millimetres

Output:

two-handed

Example

Input:

WEDNESDAY

Output:

no-handed

Op onderstaand toetsenbord — met indeling zoals die gebruikelijk is in de Verenigde Staten — geeft de dikke zwarte lijn aan welke toetsen met de linker- en rechterhand aangeslagen worden. De staat Texas is de enige Amerikaanse staat die je volledig met je linkerhand kunt typen op dit toetsenbord, en de staat Ohio de enige die je volledig met je rechterhand kunt typen.

regular US keyboard
Toetsenbord met indeling zoals die gebruikelijk is in de Verenigde Staten.

Op basis van deze toetsenbordindeling delen we woorden op in de volgende vier klassen:

  • linkshandig: woorden die je volledig met je linkerhand kunt typen
  • rechtshandig: woorden die je volledig met je rechterhand kunt typen
  • tweehandig: woorden waarvan je de eerste letter of letters met één hand en de volgende letter of letters met de andere hand kunt typen
  • onhandig: woorden die niet tot één van bovenstaande klassen behoren

Bij deze indeling maken we geen onderscheid tussen hoofdletters en kleine letters, en enkel de letters van het woord worden in rekening gebracht (alle andere karakters worden dus genegeerd).

Invoer

Eén enkele regel die een woord bevat.

Uitvoer

De klasse waartoe het woord uit de invoer behoort: linkshandig, rechtshandig, tweehandig of onhandig.

Voorbeeld

Invoer:

Texas

Uitvoer:

linkshandig

Voorbeeld

Invoer:

Ohio

Uitvoer:

rechtshandig

Voorbeeld

Invoer:

millimetres

Uitvoer:

tweehandig

Voorbeeld

Invoer:

WEDNESDAY

Uitvoer:

onhandig

Added by:Peter Dawyndt
Date:2013-09-11
Time limit:10s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:PY_NBC
Resource:None

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.