A university's computer system assigns each person a user name using the following rules.
MAXLEN characters long. The value of MAXLEN is given in the input for each test case.MAXLEN characters. Start from the first letter of the last name and append the letters in the order they appear.1–9, in that order, to the user name from Rule 3, as long as the result does not exceed MAXLEN characters. If appending a single digit would exceed MAXLEN, drop the last letter before appending the serial number.10–99, in that order, to the user name from Rule 3, as long as the result does not exceed MAXLEN characters. If appending two digits would exceed MAXLEN, drop the last letter, or the last two letters, as needed, before appending the serial number.The input contains several test cases. The first line of each test case contains two positive integers: the number of names and the value of MAXLEN ($5 \le \text{MAXLEN} \le 80$). The list of names follows.
Each name is at most 80 characters long. It begins with the first name, is followed by middle names (if any), and ends with the last name; a single space separates consecutive parts. A name may contain upper- and lower-case letters, hyphens, and apostrophes. The last name has at least two letters; every other part has at least one letter (some parts may be just initials). Each test case has at most 200 names.
The last test case is followed by a line containing two zeros (the number of names and MAXLEN), which is not processed.
For each test case, first print a line with the case number in the form Case k (where k starts at 1). Then print the generated user names, one per line, in the same order as the corresponding names in the input.