# coding: utf-8 # Your code here! import sys readline = sys.stdin.readline read = sys.stdin.read #a,b,c = map(int,readline().split()) def f(r): n = len(r) v = [0] for i in r: v += [vi+i for vi in v] v = [(v[i],i) for i in range(1<>k&1: res.append(v) for k in range(lb): v += 1 if i>>k&1: res.append(v) ans.append(res) #print(aj,j,bi,i) ans.sort() for i in ans: print(*i)