namelist1 = tuple(input().split(' ')) namelist2 = tuple(input().split(' ')) namelist3 = namelist1[:3] + namelist2[-3:] print(namelist1,namelist2,namelist3,sep='\n')