#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int N = 1e6 + 9;
long long a[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, pp = 0, s1 = 0, s2 = 0;
  cin >> n;
  vector<long long> vpos, vneg;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 0) {
      vneg.push_back(-1 * a[i]);
    } else
      vpos.push_back(a[i]);
    if (i == n - 1) {
      if (a[i] > 0)
        pp = 0;
      else
        pp = 1;
    }
  }
  long long a = vpos.size(), b = vneg.size();
  long long k = max(a, b);
  for (int i = 0; i < a; i++) {
    s1 += vpos[i];
  }
  for (int i = 0; i < b; i++) {
    s2 += vneg[i];
  }
  if (s1 == s2) {
    for (int i = 0; i < k; i++) {
      if (i < a && i < b) {
        if (vpos[i] < vneg[i]) {
          cout << "second";
          return 0;
        } else if (vpos[i] > vneg[i]) {
          cout << "first";
          return 0;
        } else {
          continue;
        }
      }
    }
    if (a == b) {
      if (pp) {
        cout << "second";
      } else
        cout << "first";
    } else {
      if (a > b)
        cout << "first";
      else
        cout << "second";
    }
  } else {
    if (s1 > s2) {
      cout << "first";
    } else
      cout << "second";
  }
  return 0;
}
