Hide

Problem F
Format Name

Accepted submissions to this problem will be granted a score of 100

Write a program that, given a name s of the format lastname, firstname, transforms the name into the format first_initial. lastname where both the first initial and the last name are capitalized.

Input

Input consists of one line, the string s, where 4|s|106. The string s consists of two words that are each made up of lowercase English letters, and are separated by one comma and one space.

Output

Output consists of one line, the transformed name.

Sample Input 1 Sample Output 1
ghandi, mahatma
M. Ghandi
Sample Input 2 Sample Output 2
jakobsdottir, katrin
K. Jakobsdottir
Hide

Please log in to submit a solution to this problem

Log in