#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> p, q;
  long long int s1 = 0, s2 = 0, index = -1;
  int n, x, a = 0, b = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x > 0) {
      p.push_back(x);
      s1 += x;
      index = 1;
    } else {
      q.push_back(abs(x));
      s2 += abs(x);
      index = 0;
    }
  }
  if (s1 > s2)
    cout << "first\n";
  else if (s2 > s1)
    cout << "second\n";
  else {
    if (p.size() == q.size()) {
      for (int i = 0; i < p.size(); i++) {
        if (p[i] != q[i]) {
          if (p[i] > q[i]) {
            cout << "first\n";
            return 0;
          } else {
            cout << "second\n";
            return 0;
          }
        }
      }
      if (index)
        cout << "first\n";
      else
        cout << "second\n";
      return 0;
    }
    for (int i = 0; i < min(p.size(), q.size()); i++) {
      if (p[i] != q[i]) {
        if (p[i] > q[i]) {
          cout << "first\n";
          return 0;
        } else {
          cout << "second\n";
          return 0;
        }
      }
    }
    if (p.size() > q.size())
      cout << "first\n";
    else
      cout << "second\n";
  }
}
