r,c = map(int,input().split()) m=[] for i in range(r): m.append([int(j) for j in input().split()]) for i in range(r): for j in range(c): print(m[j][i],end=" ") print()
To embed this project on your website, copy the following code and paste it into your website's HTML: