Category

Similar Problems

0738. Team

Time limit : 1000 ms
Memory limit : 64 mb

On programming contests each team consists of three people and has a name. Write a program that for a team name and surnames of the participants, the full name of the team builds.

Full name of the team consists of a short list of team names and the names of its members. Names of the participants in the list must be sorted alphabetically and separated by exactly one comma and space and must be brackets on both side(see examples).

Input

 The Input contains exactly 4 lines. The first line contains the name of team. Each of the following three lines contains the surname of one of the teammates. The Lengths of the lines do not exceed 50 symbols.

Output                                        

Output must contain exactly one line, containing full team name.

Samples                                  

Input

Output

1

Team#6

Yusupova

Yuldoshova

Jumaboeva

Team#6(Jumaboeva, Yuldoshova, Yusupova)

2

TUIT Urgench Branch#4

Odilov

Xusinov

Axmedov

TUIT Urgench Branch#4(Axmedov, Odilov, Xusinov)

 

Tayyorladi: Azat Yusupov
Text from: acmp.ru