Hide

Problem F
Format Name

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 \leq |s| \leq 10^6$. 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

Please log in to submit a solution to this problem

Log in