#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, b, i;
  long long sf = 0, ss = 0;
  cin >> n;
  vector<long> fir, sec;
  for (i = 0; i < n; i++) {
    cin >> b;
    if (b < 0) {
      sec.push_back(-b);
      ss += (long long)(-b);
    } else {
      fir.push_back(b);
      sf += (long long)b;
    }
  }
  if (sf > ss) {
    cout << "first";
    return 0;
  } else if (sf < ss) {
    cout << "second";
    return 0;
  }
  for (i = 0; i < fir.size(); i++) {
    if (i == sec.size() || fir[i] > sec[i]) {
      cout << "first";
      return 0;
    } else if (fir[i] < sec[i]) {
      cout << "second";
      return 0;
    }
  }
  if (sec.size() > fir.size()) {
    cout << "second";
    return 0;
  }
  if (b < 0)
    cout << "second";
  else
    cout << "first";
  return 0;
}
