def subsets():
def solve(n):
k = 2 ** n
out = [{}]
for i in range(1, k):
s = []
for j in range(0, n):
if i & (1<<j):
s.append(j+1)
out.append(s)
working_set = list(map(lambda x: set(x), out))
for element in working_set:
print(element)
n = 3
solve(n)
subsets()
ZGVmIHN1YnNldHMoKToKICAgIGRlZiBzb2x2ZShuKToKICAgICAgICBrID0gMiAqKiBuCiAgICAgICAgb3V0ID0gW3t9XQogICAgICAgIGZvciBpIGluIHJhbmdlKDEsIGspOgogICAgICAgICAgICBzID0gW10KICAgICAgICAgICAgZm9yIGogaW4gcmFuZ2UoMCwgbik6CiAgICAgICAgICAgICAgICBpZiBpICYgKDE8PGopOgogICAgICAgICAgICAgICAgICAgIHMuYXBwZW5kKGorMSkKICAgICAgICAgICAgb3V0LmFwcGVuZChzKQogICAgICAgICAgICAKICAgICAgICB3b3JraW5nX3NldCA9IGxpc3QobWFwKGxhbWJkYSB4OiBzZXQoeCksIG91dCkpCiAgICAgICAgCiAgICAgICAgZm9yIGVsZW1lbnQgaW4gd29ya2luZ19zZXQ6CiAgICAgICAgCQogICAgICAgIAlwcmludChlbGVtZW50KQogICAgbiA9IDMKICAgIHNvbHZlKG4pCnN1YnNldHMoKQo=