(lambda k:[print(k[x],end=' ') for x in range(0,len(k),3)]+[print()]+[print(k[x],end=' ') for x in range(1,len(k),3)]+[print()]+[print(k[x],end=' ') for x in range(2,len(k),3)])(input().split())