HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > C. T. 2011 > problem:


Door lock

Volume problems

• Going to the Movies
• A to the power of B
• Connected components
• Binary transformations
• Fleas
• Babel tower
• Pizza delivery
• Railway turnout
• Door lock
• Maze
• Skiers
• Matrix
• Range Minimum Query
• Министерство правды
• Coins and nests
• Ball
• Huge parking

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 1000/4000/4000/4000 ms. Memory limit 32000/65000/65000/65000 Kb.

Problem description

John wants to change the door lock with a password protected lock with display. He wants to open the door by entering any 4 digit number with different digits or with sum of digits equal to 13. When the door opens "ENTER" must be written on the display. Entering any other 4 digit number must display "LOCK". Entering number with less or more than 4 digits results with "ERROR" title. All he needs now is a program which will output these 3 messages according to his rules.

Input

A single integer N (1 ≤ N ≤ 100000).

Output

One of the following words: "ENTER", "LOCK", "ERROR".

Example

stdin stdout

13

ERROR

1234 ENTER
2343 LOCK
Для отправки решений необходимо выполнить вход.

www.contester.ru