Bob has a permutation of integers from 1 to n. Denote this permutation as p. The i-th element of p will be denoted as p_{i}. For all pairs of distinct integers i, j between 1 and n, he wrote the number a_{i}, j = min(p_{i}, p_{j}). He writes a_{i}, i = 0 for all integer i from 1 to n.

Bob gave you all the values of a_{i}, j that he wrote down. Your job is to reconstruct any permutation that could have generated these values. The input will be formed so that it is guaranteed that there is at least one solution that is consistent with the information given.


-----Input-----

The first line of the input will contain a single integer n (2 ≤ n ≤ 50).

The next n lines will contain the values of a_{i}, j. The j-th number on the i-th line will represent a_{i}, j. The i-th number on the i-th line will be 0. It's guaranteed that a_{i}, j = a_{j}, i and there is at least one solution consistent with the information given.


-----Output-----

Print n space separated integers, which represents a permutation that could have generated these values. If there are multiple possible solutions, print any of them.


-----Examples-----
Input
2
0 1
1 0

Output
2 1

Input
5
0 2 2 1 2
2 0 4 1 3
2 4 0 1 3
1 1 1 0 1
2 3 3 1 0

Output
2 5 4 1 3



-----Note-----

In the first case, the answer can be {1, 2} or {2, 1}.

In the second case, another possible answer is {2, 4, 5, 1, 3}.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "\nfrom itertools import chain\nn = int(input())\n\na = [list(map(int, input().split())) for i in range(n)]\n\nfor i in range(n):\n    a[i][i] = i\n\nans = []\n\nwhile n > 0:\n    done = False\n    for i in chain(range(1, n-1), [0, n-1]):\n        if done:\n            break\n        b = True\n        for dx in -1, 0, 1:\n            for dy in -1, 0, 1:\n                if dx != 0 and dy != 0:\n                    continue\n                if dx == 0 and dy == 0:\n                    continue\n                nx, ny = i+dx, i+dy\n                if nx < 0 or nx >= n:\n                    continue\n                if ny < 0 or ny >= n:\n                    continue\n                b = b and a[nx][ny] == 1\n        if b:\n            ans.append(a[i][i])\n#            print(ans)\n            if i < n - 1:\n                a = a[:i] + a[i+1:]\n            else:\n                a = a[:i]\n            for j in range(len(a)):\n                if i < n - 1:\n                    a[j] = a[j][:i] + a[j][i+1:]\n                else:\n                    a[j] = a[j][:i]\n            for x in range(len(a)):\n                for y in range(len(a)):\n                    if x == y:\n                        continue\n                    a[x][y] -= 1\n            n -= 1\n            done = True\n    if not done:\n        return\n#    for x in a:\n#        for y in x:\n#            print(y, end = ' ')\n#        print()\n\n\nret = [0] * len(ans)\nfor i in range(len(ans)):\n    ret[ans[i]] = i + 1\n\nfor i in ret:\n    print(i, end = ' ')\n"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: