#include <bits/stdc++.h>
using namespace std;
bool endd;
long long n, sumf, sums;
vector<int> f, s;
int main() {
  cin >> n;
  int a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a < 0) {
      s.push_back(-a);
      sums -= a;
      endd = false;
    } else {
      f.push_back(a);
      sumf += a;
      endd = true;
    }
  }
  if (sums > sumf)
    cout << "second" << endl;
  else {
    if (sumf > sums)
      cout << "first" << endl;
    else {
      int j = 0;
      while (j < s.size() && j < f.size() && s[j] == f[j]) j++;
      if (j == s.size() && j == f.size()) {
        if (endd)
          cout << "first" << endl;
        else
          cout << "second" << endl;
      } else {
        if (j == s.size())
          cout << "first" << endl;
        else {
          if (j == f.size())
            cout << "second" << endl;
          else {
            if (s[j] > f[j])
              cout << "second" << endl;
            else
              cout << "first" << endl;
          }
        }
      }
    }
  }
  return 0;
}
