#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a, b;
  unsigned long long s1 = 0, s2 = 0;
  int n;
  int last = 0;
  cin >> n;
  while (n--) {
    int c;
    cin >> c;
    if (c > 0) {
      a.push_back(c);
      s1 += c;
      last = 0;
    } else {
      b.push_back(-c);
      s2 += -c;
      last = 1;
    }
  }
  if (s1 > s2) {
    cout << "first" << endl;
  } else if (s2 > s1) {
    cout << "second" << endl;
  } else {
    int n = min(a.size(), b.size());
    bool ok = false;
    for (int i = 0; (i < n) && !ok; ++i) {
      if (a[i] > b[i]) {
        cout << "first" << endl;
        ok = true;
      } else if (b[i] > a[i]) {
        cout << "second" << endl;
        ok = true;
      }
    }
    if (!ok) {
      if (a.size() > b.size()) {
        cout << "first" << endl;
      } else if (b.size() > a.size()) {
        cout << "second" << endl;
      } else if (last == 0) {
        cout << "first" << endl;
      } else {
        cout << "second" << endl;
      }
    }
  }
  return 0;
}
