from math import factorial
print(factorial(4))
for i in range(1, 2):
    for j in range(1, 3):
        for k in range(1, 4):
            for l in range(1, 5):
                print(4)
                print(i, j, k, l)
    
