#K13176. Find Duplicates in a List of Names
Find Duplicates in a List of Names
Find Duplicates in a List of Names
You are given an integer n followed by n names on separate lines. Your task is to print the names that appear more than once, in the order of their first appearance. Each duplicate name should be printed on a new line. If no name appears more than once, print "No duplicates".
Note: Comparisons are case-sensitive. For example, 'Alice' and 'alice' are considered different names.
The problem could be summed up by the requirement that if a name appears more than once, then mathematically we could say its count c satisfies \(c > 1\).
inputFormat
The first line of input contains an integer n, representing the number of names. The subsequent n lines each contain one name.
outputFormat
If there exist one or more names that appear more than once, output each such name on a new line in the order they first appeared in the list. If there are no duplicates, output "No duplicates".
## sample5
alice
bob
alice
eve
bob
alice
bob
</p>