from collections import deque n = int(input()) q = deque([i for i in range(10, 100) if int(str(i)[0]) < int(str(i)[1])]) for _ in range(n): x = q.popleft() y = x*10+int(str(x)[-1]) q.append(y) print(x)