Recently, Mr. ATH's hard disk is almost full so his computer crashes often. He decided to clean up his hard disk by
uninstalling some programs. Currently his computer is running under an operation system called SOD, which is an
operation system that has similar commands to DOS.
To remove a program, he needs to change his working directory to the directory of the program.
After typing "uninstall" in the directory, then the program will be automatically uninstalled.
However, unlike DOS, this operation system's command of changing directory is fairly limited.
The command "cd" has the following usage:
Note that in the SOD operation system, the root directory is "/" and he started at root directory initially.
Now Mr. ATH has listed the directories of the programs that he wanted to delete IN ORDER,
because violation of the order would cause his computer to crash.
Since the function of executing a batch file is not even implemented in SOD operation system (what a bad OS),
Mr. ATH would have to type these commands by hand.
Besides, because Mr. ATH is lazy, he wanted to type as few lines of commands as possible.
You going to write a program that will generate minimum lines of commands that Mr. ATH could use to
delete all program he listed.
The input may contain many cases (Mr. ATH need to clean his hard disk very often).
The first line of each case contain exactly one integer n (1<=n<=50) indicating the number of program that Mr. ATH wanted to delete.
Then the following n lines consist of strings without any spaces that describe the directories of the programs.
The names of adjacent directories are separated by a slash "/", and there is no slash succeeding the last directory name.
There will be no same strings appear in the same case. Besides, he will not uninstall his root directory "/".
The name for each directory has length at least 1 and at most 32 and consist of
only letters (a-z, A-Z), digits (0-9) and underscores "_".
Moreover, the SOD operation system can only allow the depth of hierarchy to at most 10 levels.
That is, "/1/2/3/4/5/6/7/8/9/10" is valid, while "/1/2/3/4/5/6/7/8/9/10/11" is not a valid directory.
You should also note that the names are case sensitive, that is, "/Aaaa" is a directory different from "/aaaa".
For each case, output "Case x:" in the first line, where x is the number of case, starting from 1.
Then output the commands, each in a line, which can be "cd ..", "cd [directory_name]", or "uninstall".
Note that he always starts at root directory "/" in every case.