Phone Unlock
Time limit2sMemory limit1024 MB
Checks whether three pairwise different keys pressed in order form a straight horizontal or vertical line on the keypad.
- Level
Easy2 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
The mobile phone company SimSung is preparing to release a next-generation smartphone codenamed Mokia. The marketing team claims the phone will firmly establish itself in the smartphone market and quickly push out all of its competitors.
The phone will run the well-known Doors Mobile 8 operating system from MacroHard. The problem is that the first batch is scheduled for release on Monday, and Doors Mobile 8 is still in beta testing. While testing the unlock method, the programmers ran into a problem.
The phone unlocks with an innovative technology called ThinkAndTouch. The user enters a combination of three digits. If the corresponding keys are in a row, horizontally or vertically, one after another, and the three digits are pairwise different, the phone unlocks.
The Mokia keyboard looks like this:

The chief of SimSung asked you to write a program that checks whether a given key combination can unlock the phone.
Input
The first and only line contains three digits, the key combination the user pressed.
Output
Print <Unlocked> if the phone can be unlocked with the given key combination. Otherwise, print <Locked>.