#include <bits/stdc++.h>
using namespace std;
int dr[] = {+1, -1, +0, +0};
int dc[] = {+0, +0, +1, -1};
long long gcd(long long n, long long m) { return m ? gcd(m, n % m) : n; }
long long lcm(long long n, long long m) { return n / gcd(n, m) * m; }
struct debugger {
  static void call(string::iterator it, string::iterator ed) {}
  template <typename T, typename... aT>
  static void call(string::iterator it, string::iterator ed, T a, aT... rest) {
    string b;
    for (; *it != ','; ++it)
      if (*it != ' ') b += *it;
    cout << b << "=" << a << " ";
    call(++it, ed, rest...);
  }
};
void solve() {
  long long n, sumOne = 0, sumTwo = 0;
  scanf("%lld", &n);
  ;
  vector<int> vc1, vc2;
  bool flag = true;
  for (int i = 0; i < n; i++) {
    long long x;
    scanf("%lld", &x);
    ;
    if (x >= 0) {
      vc1.push_back(x);
      flag = true;
      sumOne += x;
    } else {
      x *= -1;
      vc2.push_back(x);
      flag = false;
      sumTwo += x;
    }
  }
  if (sumOne > sumTwo) {
    cout << "first\n";
  } else if (sumTwo > sumOne) {
    cout << "second\n";
  } else {
    if (vc1 > vc2) {
      cout << "first\n";
    } else if (vc2 > vc1) {
      cout << "second\n";
    } else {
      if (flag) {
        cout << "first\n";
      } else {
        cout << "second\n";
      }
    }
  }
}
int main() {
  solve();
  return 0;
}
