All Submissions


Problem Statement

Alice gives a simple task to Bob. The task is as follows: Given a string, Bob has to capitalize the first letter of every word in the string AND also replace the spaces between words by underscore("_"). Alice gives Bob a String containing lowercase words separated by one or more space characters and Bob should return a String that is same as the String except with the first character of each word capitalized and space replaced by underscore.

Input

First line of input contains T, the number of test cases. The following T lines contain input Strings each on a new line.

Output

Print the Case index followed by the Processed String.

Constraints

String may have leading or trailing spaces.
String will contain between 1 and 50 characters, inclusive.
Each character of string will either be a space or a lowercase letter ('a' to 'z').
T is less than 50.

Sample Input


4
the hobbit
an unexpected  journey
dream share innovate
a


Sample Output


Case#1: The_Hobbit
Case#2: An_Unexpected___Journey
Case#3: Dream_Share_Innovate
Case#4: A


Problem Setter: Anjali Singh

Languages: C,C++,C#,Java,JavaScript,Pascal,Perl,PHP,Python,Ruby

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0