newton/solutions/python/1985A.py

9 lines
172 B
Python
Raw Normal View History

2025-01-11 11:41:29 +00:00
t = int(input())
for _ in range(t):
a, b = [list(x) for x in input().split()]
a[0], b[0] = b[0], a[0]
print(''.join(c for c in a),''.join(c for c in b))