N = int(input()) ans = [] for i in range(1, N + 1): for j in range(10): if (i >> j) & 1: ans.append(str(j + 1)) break print(''.join(ans))