#include<bits/stdc++.h>
using namespace std;
int main()
{
int ts;
cin>>ts;
getchar();
while(ts--)
{
string s; ///char s[100];
getline(cin,s); ///gets(s);
stringstream ss;
ss<<s;
int num,ar[100]={0},ind=0;
while(ss>>num)
{
ar[ind]=num;
ind++;
}
for(int i=0;i<ind;i++)
{
cout<<ar[i]<<endl;
}
}
return 0;
}
using namespace std;
int main()
{
int ts;
cin>>ts;
getchar();
while(ts--)
{
string s; ///char s[100];
getline(cin,s); ///gets(s);
stringstream ss;
ss<<s;
int num,ar[100]={0},ind=0;
while(ss>>num)
{
ar[ind]=num;
ind++;
}
for(int i=0;i<ind;i++)
{
cout<<ar[i]<<endl;
}
}
return 0;
}