n = int(input()) lst = list(range(n, 0, -1)) res = lst * n print(*res, sep='')