#include <iostream>
#include "vector"
#include "stack"
using namespace std;
int main() {
int n;
while (cin >> n) { // 注意 while 处理多个 case
vector<string> strs;
stack<string> myStack;
while (n--) {
string temp;
cin >> temp;
strs.push_back(temp);
}
// for (int num = 1; num <= strs.size(); num++) {
// for (int i = 0; i < num; i++) {
// myStack.push(strs[i]);
// }
// int max = 4;
// int start = 1;
// while (max-- && !myStack.empty()) {
// string a = myStack.top();
// myStack.pop();
// cout << start << '=' << a << ' ';
// start++;
// }
// cout << endl;
// }
int start = 0;
while (start < strs.size()) {
int max = 4;
int n = 1;
for (int i = start; i >= 0 && max > 0; i--) {
cout << n << '=' << strs[i] << ' ';
max--;
n++;
}
cout << endl;
start++;
}
}
}
// 64 位输出请用 printf("%lld"n