Write a program that reads a sequence of numbers of identity card (DNIs) and prints them adding their letter corresponding to the number of fiscal identification (NIF).
To compute the NIF letter, you must compute the remainder of divide the number of DNI by 23 and use the following correspondence:
0 | T |
1 | R |
2 | W |
3 | A |
4 | G |
5 | M |
6 | Y |
7 | F |
8 | P |
9 | D |
10 | X |
11 | B |
12 | N |
13 | J |
14 | Z |
15 | S |
16 | Q |
17 | V |
18 | H |
19 | L |
20 | C |
21 | K |
22 | E |
Input
Input is a sequence of DNI numbers (positive integer numbers with eight or less digits).
Output
For each DNI number of the input, print it in a line with exactly eight digits and adding its letter corresponding to the NIF separated by a dash.
Observation
Use a function to return the letter corresponding to every number between 0 and 22. Use a function number_of_digits() that computes the number of digits of a number and use it to print the zeros on the left.
Input
12345678 99999999 1234567 666
Output
12345678-Z 99999999-R 01234567-L 00000666-E