#K60147. Invitation Formatter
Invitation Formatter
Invitation Formatter
You are given a list of participants. Each participant is described by two strings: a first name and a last name. Your task is to format and print the list of participants such that each line contains one participant's name in the format LastName, FirstName
.
The first line of the input contains an integer \(n\) (\(n \ge 0\)) representing the number of participants. Then follow \(n\) lines, each containing two non-empty strings: the first name and the last name of a participant. If \(n\) equals 0, your program should output nothing.
Note: The input is read from standard input and the output is written to standard output. You must strictly follow the input and output formats.
inputFormat
The input is given via standard input. The first line contains an integer \(n\), the number of participants. The following \(n\) lines each contain two strings separated by space: the first name and the last name.
outputFormat
Print the formatted names to standard output. Each line should contain one participant's name in the format LastName, FirstName. If there are no participants (i.e., \(n=0\)), output nothing.
## sample3
John Doe
Jane Smith
Alice Johnson
Doe, John
Smith, Jane
Johnson, Alice
</p>