from functools import lru_cache

def solve():
    @lru_cache(maxsize=None)
    def calc(N):
        if N==0:
            return "{}"

        X=[]
        for i in range(N):
            if (N>>i)&1:
                X.append(calc(i))
        return "{"+",".join(X)+"}"
    return calc(int(input()))

print(solve())