#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
double PI = 4 * atan(1);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int x;
  cin >> x;
  int a[x];
  vector<int> p, n;
  for (int i = 0; i < x; i++) {
    cin >> a[i];
    (a[i] < 0 ? n.push_back(a[i]) : p.push_back(a[i]));
  }
  long long sum = accumulate(a, a + x, 0LL);
  if (sum != 0) {
    cout << (sum > 0 ? "first\n" : "second\n");
    return 0;
  }
  for (int i = 0; i < p.size() && i < n.size(); i++) {
    if (p[i] == abs(n[i])) continue;
    cout << (p[i] > abs(n[i]) ? "first\n" : "second\n");
    return 0;
  }
  if (p.size() > n.size())
    cout << "first\n";
  else if (p.size() < n.size())
    cout << "second\n";
  else
    cout << (a[x - 1] > 0 ? "first\n" : "second\n");
  return 0;
}
