Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Numerics;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Threading.Tasks;
- namespace solutions
- {
- class Program
- {
- public static void Main()
- {
- var count = int.Parse(Console.ReadLine());
- var result = new HashSet<string>();
- for (int i = 0; i < count; i++)
- {
- var input = Console.ReadLine().Split();
- foreach (var item in input)
- {
- result.Add(item);
- }
- }
- Console.WriteLine(string.Join(" ", result.OrderBy(x => x)));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement