#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> f, s;
int main() {
  long long buf, sumf = 0, sums = 0;
  int last = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> buf;
    if (buf > 0) {
      f.push_back(buf);
      sumf += buf;
      last = 1;
    } else {
      s.push_back(-buf);
      sums -= buf;
      last = 2;
    }
  }
  if (sumf > sums)
    cout << "first" << endl;
  else if (sumf < sums)
    cout << "second" << endl;
  else {
    for (int i = 0; i < min(f.size(), s.size()); i++) {
      if (f[i] > s[i]) {
        cout << "first" << endl;
        return 0;
      } else if (f[i] < s[i]) {
        cout << "second" << endl;
        return 0;
      }
    }
    if (f.size() > s.size()) {
      cout << "first" << endl;
    } else if (f.size() < s.size()) {
      cout << "second" << endl;
    } else {
      if (last == 1)
        cout << "first" << endl;
      else
        cout << "second" << endl;
    }
  }
  return 0;
}
