from collections import * def f(x): if memo[x]!=-1: return memo[x] if x==0: return '{}' i = 0 s = set() while x: if x%2: s.add(f(i)) x //= 2 i += 1 res = '{'+','.join(list(s))+'}' memo[x] = res return res N = int(input()) memo = defaultdict(lambda: -1) print(f(N))