#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
int m;
scanf("%d",&m);
vector<string> vec;
for(int i=0;i<m;i++){
string str;
cin>>str;
vec.push_back(str);
for(int j=1;j<=4;j++){
cout<<j<<'='<<vec[vec.size()-j];
if(j==vec.size()){
cout<<endl;
break;
}
if(j<4) cout<<" ";
else{
cout<<endl;
break;
}
}
}
}