import sys
n=int(input())
a=[[1,2,3],[4,5,6],[7,8,9]]
for i in range(0,len(a)):
    for j in range(0,len(a[i])):
        a[i][j]=a[i][j]*n
print(a)