提示: 欢迎访问OurACM平台。
Problem 1897 Capitalizing the Title!

Accept: 180    Submit: 416
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

A common word-processing task is capitalizing the first letter of each word in a title. Now you will be given a String title containing words consist of lowercase,uppercase or digit, separated by one or more space characters and returns a String that is identical to title except with the first character of each word capitalized(if the first character of the word is digit or already uppercase,remain the same).

Input

Input contains multiple cases.

The first line contains an integer T representing the number of cases. Then following T cases.

Each test case contains a string S (1 <= SIZE(S) <= 100),represents the title.

Output

For each test case, output one line containing "Case #x: y", where x is the case number (starting from 1) and y is the title after capitalized.

Sample Input

4 introduction to algorithms more than one space between words tCO10 algorithm qualification round 1 aCM iCPC asia Regional 2010 fuZhou

Sample Output

Case #1: Introduction To Algorithms Case #2: More Than One Space Between Words Case #3: TCO10 Algorithm Qualification Round 1 Case #4: ACM ICPC Asia Regional 2010 FuZhou

Source

FOJ有奖月赛-2010年05月

Submit  Back  Status  Discuss