|Author:||A. Klenin, I. Ludov||Time limit:||2 sec|
|Input file:||input.txt||Memory limit:||64 Mb|
Young black-hat hacker Vasya routinely installs key loggers on every computer he can get his hands on. Browsing the logs collected, he sometimes can glance passwords of unaware users.
The IT department of the university where Vasya studies noticed suspicious activity and introduced a new, more secure way to enter passwords. Instead of password input field, window with 9 buttons is displayed. Buttons are arranged into 3 × 3 grid as shown in the table below.
To overcome this scheme, Vasya downloaded another cool program: mouse logger. It saves coordinates of clicks in a file, which Vasya is later able to browse. However, a complication has arisen: no information is saved about the position of password window on the screen. Indeed, it might even be partially off screen!
Your program must, given the series of mouse clicks, determine all possible corresponding passwords.
|No.||Input file (
||Output file (|