The digital lock used to access the university datacenter consists of five wheels with hexadecimal digits written on each wheel.
The digits are written in the order "0123456789ABCDEF", if rotate wheel after 'F' digit then '0' will appear again and so on.
The new system administrator found that information about the key opening the door is jumbled. He managed to get the list of possible passwords where exactly one is correct. Additionally he was told that:
The password contained four odd digits and one even digit (the digits 1,3,5,7,9,B,D,F are considered odd, others are considered even).
Previous system administrator was so odd person that he hacked the lock so it accepted the nearest odd digits instead of even one (so if the key was 30997, then any of keys 3F997, 30997 and 31997 is accepted; for the key FFFFE any of keys FFFFD, FFFFE and FFFFF is accepted).
The system administrator wants to find the sequence of keys to enter it in the lock one by one that:
May contain keys from the list as well as keys not listed in there.
Ensures that lock will be opened at the end of the sequence or earlier.
Contains the minimum possible number of keys.
Is lexicographically minimal among all sequences, conforming 1-3.
Help him to find such a sequence.
First line of the input contains one integer (1 \le N \le 6000). Each of the following lines contains one key — the five-digit string consisting of the hexadecimal digits ('0' - '9' and 'A' - 'F'). You may assume that exactly one digit in any of the keys is even.
In first line of the input print one integer — minimum number of keys in the sysadmin's list. Then following lines shall contain the keys in order they shall be entered to the lock. Note that you shall select lexicographically minimal list of keys among all possible shortest lists.
Example 1
Example 2