ans = [] n = int(input()) for i in range(1, 30): if n % 2: ans.append("{"*i+"}"*i) n //= 2 print("{", end = "") print(*ans, sep = ",", end = "") print("}")