import sys sys.setrecursionlimit(10**6) memo = {0: '{}'} def rec(x): if x in memo: return memo[x] res = '{' digit = 0 xc = x while xc != 0: xc, r = divmod(xc, 2) if r == 1: res += rec(digit) + ',' digit += 1 if res[-1] == ',': res = res[:-1] res += '}' memo[x] = res return res n = int(input()) print(rec(n))