传统题 1000ms 256MiB

Creating Words

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Description

Matthew is given two strings $a$ and $b$, both of length $3$. He thinks it's particularly funny to create two new words by swapping the first character of $a$ with the first character of $b$. He wants you to output $a$ and $b$ after the swap.

Note that the new words may not necessarily be different.

The first line contains $t$ ($1 \leq t \leq 100$)  — the number of test cases.

The first and only line of each test case contains two space-separated strings, $a$ and $b$, both of length $3$. The strings only contain lowercase Latin letters.

For each test case, after the swap, output $a$ and $b$, separated by a space.

Input

The first line contains $t$ ($1 \leq t \leq 100$)  — the number of test cases.

The first and only line of each test case contains two space-separated strings, $a$ and $b$, both of length $3$. The strings only contain lowercase Latin letters.

Output

For each test case, after the swap, output $a$ and $b$, separated by a space.

6
bit set
cat dog
hot dog
uwu owo
cat cat
zzz zzz
sit bet
dat cog
dot hog
owu uwo
cat cat
zzz zzz

快来参赛吧!

未参加
状态
已结束
规则
ACM/ICPC
题目
9
开始于
2025-4-6 9:00
结束于
2025-4-6 12:00
持续时间
3 小时
主持人
参赛人数
0