
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

public class Div3_724 {

	static void sort(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}

	public static void main(String[] args) {
		FastReader sc = new FastReader();

		int t = 1;
		out: while (t-- > 0) {
			int m = sc.nextInt();
			int n = m * m;
			HashMap<Long, Integer> map = new HashMap<>();
			StringBuilder sb = new StringBuilder();

			for (int i = 0; i < n; i++) {
				long a = sc.nextLong();
				map.put(a, map.getOrDefault(a, 0) + 1);
			}

			for (Map.Entry<Long, Integer> en : map.entrySet()) {
				if (en.getValue() == n) {
					for (int i = 0; i < m; i++) {
						sb.append(en.getKey()).append(" ");
					}
					continue;
				}
				if (en.getValue() % 2 != 0) {
					sb.append(en.getKey()).append(" ");
				}
			}
			System.out.println(sb);
		}

	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long[] readArray(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

}
