<reponame>baeckn/Hackerrank_SQL
# Enter your code here. Read input from STDIN. Print output to STDOUT
for i in range(int(input())):
    string = input()
    print(string[::2], string[1::2])

# Enter your code here. Read input from STDIN. Print output to STDOUT
for i in range(int(input())):
    string = input()
    print(string[::2], string[1::2])
# Enter your code here. Read input from STDIN. Print output to STDOUT