Practice: Roll Call
Time limit1sMemory limit128 MB
Rewrite each first and last name pair as one line in Last, First order with a case number.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
Mr. Petersworth teaches 10th grade history at True Blue High School. The principal hands him a class list with each student's first name and last name written on separate lines, which makes taking attendance slow. Mr. Petersworth wants the first name and the last name on one line instead, with the last name in front.
Write a program that rewrites the list in the format he wants.
Input
The first line contains the number of test cases.
Each test case takes two lines. The first line holds the student's first name and the second line holds the student's last name. Both names are shorter than 20 characters.
Output
For each test case, print one line in the format Case x: Last, First, where x is the case number, Last is the last name, and First is the first name.