a = input().split() b=[] for x in range(3): b.append(a[x*4:x*4+4]) for row in b: for x in row: print("%4s" % x,end="") print()