xy = [map(str, input().split()) for _ in range(5)] x, y = [list(i) for i in zip(*xy)] print(x[0]+x[1]) print(y[0])