import java.io.*;
import java.util.*;

public class permutation_as implements Runnable {

    boolean check(ArrayList<Integer> b, Map<ArrayList<Integer>, Integer> c) {
        Map<ArrayList<Integer>, Integer> d = new HashMap<ArrayList<Integer>, Integer>();
        int n = b.size();
        for (int i = 0; i < n; i++) {
            ArrayList<Integer> a = new ArrayList<Integer>(n - 1);
            for (int j = 0; j < n; j++) {
                if (b.get(j) < i) {
                    a.add(b.get(j));
                } else if (b.get(j) > i) {
                    a.add(b.get(j) - 1);
                }
            }
            if (!c.containsKey(a)) {
                return false;
            }
            if (d.containsKey(a)) {
                d.put(a, d.get(a) + 1);
            } else {
                d.put(a, 1);
            }
        }

        for (Map.Entry<ArrayList<Integer>, Integer> e : d.entrySet()) {
            if (!c.get(e.getKey()).equals(e.getValue())) {
                return false;
            }
        }

        return true;
    }

    public void solve() throws IOException {
        Scanner in = new Scanner(new File("permutation.in"));
        PrintWriter out = new PrintWriter(new File("permutation.out"));

        int n = in.nextInt();
        ArrayList<Integer>[] a = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            a[i] = new ArrayList<Integer>(n - 1);
            for (int j = 0; j < n - 1; j++) {
                a[i].add(in.nextInt() - 1);
            }
        }
        Map<ArrayList<Integer>, Integer> c = new HashMap<ArrayList<Integer>, Integer>();
        for (int i = 0; i < n; i++) {
            if (c.containsKey(a[i])) {
                c.put(a[i], c.get(a[i]) + 1);
            } else {
                c.put(a[i], 1);
            }
        }

        ArrayList<Integer> answer = null;

        search:
        for (int i = 0; i < n; i++) {
            ArrayList<Integer> b = new ArrayList<Integer>(n - 2);
            for (int x : a[i]) {
                if (x != n - 2) {
                    b.add(x + 1);
                }
            }

            boolean found = false;
            for (int j = 0; j < n; j++) {
                if (i != j) {
                    int k = 0;
                    boolean valid = true;
                    for (int x : a[j]) {
                        if (x != 0) {
                            if (x != b.get(k++)) {
                                valid = false;
                                break;
                            }
                        }
                    }
                    if (valid) {
                        found = true;
                    }
                }
            }

            if (found) {
                for (int j = 0; j < n; j++) {
                    b = new ArrayList<Integer>(n - 1);
                    int k = 0;
                    for (int x : a[i]) {
                        if (k == j) {
                            b.add(0);
                        }
                        k++;
                        b.add(x + 1);
                    }
                    if (k == j) {
                        b.add(0);
                    }

                    if (check(b, c)) {
                        answer = b;
                        break search;
                    }
                }
            }
        }

        for (int x : answer) {
            out.print((x + 1) + " ");
        }
        out.println();

        in.close();
        out.close();
    }

    public void run() {
        try {
            solve();
        } catch (IOException e) {
            System.exit(64);
        }
    }

    public static void main(String[] arg) throws IOException {
        new Thread(new permutation_as()).start();
    }
}
