#include <bits/stdc++.h>
using namespace std;
using namespace std;
long long max(long long x, long long y) {
  if (x > y)
    return x;
  else
    return y;
}
long long min(long long x, long long y) {
  if (x > y)
    return y;
  else
    return x;
}
long long po(long long x, long long y) {
  long long j = 0, i = 1;
  while (j < y) {
    i = i * x;
    j++;
  }
  return i;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, i, j, k, q = 0, p = 0;
  vector<long long> a, b;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> k;
    if (k > 0) {
      p = p + k;
      a.push_back(k);
    } else {
      q = q + k;
      b.push_back(-k);
    }
  }
  q = (-q);
  if (p > q) {
    cout << "first";
  } else if (q > p) {
    cout << "second";
  } else {
    j = min(a.size(), b.size());
    p = 0;
    q = 0;
    for (long long i = 0; i < j; i++) {
      if (a[i] > b[i]) {
        p++;
        break;
      } else if (b[i] > a[i]) {
        q++;
        break;
      }
    }
    if (p)
      cout << "first";
    else if (q)
      cout << "second";
    else {
      if (k > 0)
        cout << "first";
      else
        cout << "second";
    }
  }
}
