Selection

3.3

69 votes
Easy
Problem

Bob gives you a list of N strings and a task to solve. The task is to remove all the duplicate strings from the list and print the resulting list of strings in a sorted order.

Input:
The first line contains an integer N. Then next N lines contain a string Si.

Output:
Print the sorted list.

Constraints:
1 ≤ |N| ≤ 5000
1 ≤ |Si| ≤ 100

Sample Input
16
nandu 
kanth
kalyan
dhiraj
kanth
kalyan
baala
kt
baala
jayanth
sampu
baala
kanth
kalyan
baala
kt
Sample Output
baala
dhiraj
jayanth
kalyan
kanth
kt
nandu
sampu
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?