解法:
模运算的性质
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
#define endl '\n'
void solve() {
string s;
cin >> s;
long long t = 0;
for (int i = 0; i < s.size();i++) {
t = t * 10 + (s[i] - '0');
t %= 7;
}
if ((t % 7) & 1) cout << "lmly" << endl;
else cout << "tzz" << endl;
}
int main() {
int t; cin >> t;
while (t--) {
solve();
}
return 0;
}