Files
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

15 lines
312 B
C++

#include <bits/stdc++.h>
using namespace std;
int main() {
int T;
scanf("%d", &T);
while (T--) {
int n, m;
scanf("%d %d", &n, &m);
if (n % (m + 1) == 0)
cout << "second" << endl;
else
cout << "first" << endl;
}
return 0;
}