Problem G
I hate XML!
Time Limit: 1 second

Bob Slydell: You see, what we're trying to do
is get a feeling for how people spend their time
at work so if you would, would you walk us through
a typical day, for you?

Peter Gibbons: Yeah.
Bob Slydell: Great.
Peter Gibbons: Well, I generally come in at least
fifteen minutes late, ah, I use the side door - that
way Lumbergh can't see me, heh - after that I sorta
space out for an hour.

Bob Porter: Da-uh? Space out?
Peter Gibbons: Yeah, I just stare at my desk,
but it looks like I'm working. I do that for probably
another hour after lunch too, I'd say in a given
week I probably only do about fifteen minutes of real,
actual, work.
Mike Judge

Extensible Markup Language (XML) has become so popular that people now use it for almost everything. Ask many "manager types" about XML, and they will tell you that it is the ultimate magic ingredient. All you have to do is add XML, and all of your problems will disappear. Computers will instantly start understanding each other, files will be automatically translated from one format to another, and boring databases will be turned into intelligent reasoning machines. XML!

Samir hates XML. This morning, his boss said that he wanted Samir to design an XML-based communication protocol for sending product descriptions. Each message will consist of a list of strings, one for each property of the product. Properties include such things as product category, product type, price, model and colour. An example of a message is {"Stationery", "Stapler", "$7.95", "red"}.

"Why XML?" asked Samir.
"What do you mean?! XML is the standard!" was the reply.

Samir was confused. XML seemed like a very inefficient solution. The XML to send the above description would look like this.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE itml PUBLIC "-//W3C//DTD ITML 1.0 Transitional//EN"
    "http://www.initech.ofc/TR/itml1/DTD/itml1-transitional.dtd">
<initech-itml:list xmlns="http://www.initech.ofc/1999/itml"
    lang="en" xml:lang="en">
    <initech-itml:productCategory>Stationery</initech-itml:productCategory>
    <initech-itml:productType>Stapler</initech-itml:productType>
    <initech-itml:price>$7.95</initech-itml:productType>
    <initech-itml:colour>red</initech-itml:productType>
</initech-itml:list>

It is interesting that some people claim that XML is both human-readable and easily parsed by machines. Note also that 96% of the above example is XML overhead. Samir had a better idea. His language would be a lot more efficient. Samir's protocol would encode the message as follows.

Stationery;Stapler;$7.95;red.

The encoding algorithm takes a list of strings and performs two operations. First, each semicolon (';') in each of the strings is replaced by "\;", each period ('.') is replaced by "\." and each backslash ('\') is replaced by "\\". Then the encoded strings are put together, separated by semicolons with a period at the end. Your job is to write the decoder.

Input
The first line of input gives the number of cases, N. N test cases follow. Each one is an encoded message that starts on a new line. There will be no other characters in the input.

Output
For each test case, output one line containing "Case #x:" followed by n - the number of strings encoded in the message. Then print the strings. Start each one on a new line. Print an empty line between test cases.

Sample Input Sample Output
5
Stationery;Stapler;$7\.95;red.
Flare;pin;$0\.99;pink.
<?xml version="1\.0" encoding="ISO-8859-1"?>.
 1\;\.\\; 2; 3.
<html>;    <body bgcolor=black>
        /\\/\\/\\;    </body>
</html>.
Case #1: 4
Stationery
Stapler
$7.95
red

Case #2: 4
Flare
pin
$0.99
pink

Case #3: 1
<?xml version="1.0" encoding="ISO-8859-1"?>

Case #4: 3
 1;.\
 2
 3

Case #5: 3
<html>
    <body bgcolor=black>
        /\/\/\
    </body>
</html>


Problemsetter: Igor Naverniouk