import java.util.*;

import java.io.*;
import java.math.*;


public class Main {
	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		
		int n = in.nextInt();
		int lim = n*n;
		
		int a[] = new int[lim];
		
		for(int i = 0; i < lim; i++){
			a[i] = in.nextInt();
		}
		
		int r[] = new int[n];
		int ind = 0;
		int count = 1;
		
		Arrays.sort(a);
		//System.out.println(Arrays.toString(a));
		int last = a[0];
		for(int i = 1; i <lim; i++){
			
			if(a[i] != last){
				
				
				if(count %2 != 0){
					r[ind] = last;
					ind++;
				}
				count = 1;
				last = a[i];
				
			}
			else{
				
				count++;
				
			}
		}
		
		if(count %2 != 0){
			r[ind] = last;
			ind++;
		}
		
		for(int i = 0; i<n-1; i++){
			System.out.print(r[i] + " ");
		}
		System.out.println(r[n-1]);
		
	}	
}