题目链接

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n; 
	string str;
	while(cin>>n){
		vector<string> v;
		while(n--){
			cin>>str;
			v.push_back(str);
			int k=1; 
			for(int i=v.size()-1;i>=0&&k<=4;i--){
				if(k==4||i==0) cout<<k<<"="<<v[i]<<endl;
				else cout<<k<<"="<<v[i]<<" ";
				k++;
			}
		}
	} 
	
	return 0;
}