Từ TỰ CHỌN KHỐI 10
k=int(input()) for _ in range(k): s = input() n = ' '.join(s.strip().split()) print(n)