#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n;
  int a[2 * 100000], b[2 * 100000];
  int ca = 0, cb = 0;
  long long sa = 0, sb = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x < 0) {
      sb += abs(x);
      b[cb++] = abs(x);
    } else {
      sa += x;
      a[ca++] = x;
    }
  }
  if (sb > sa)
    cout << "second";
  else if (sa > sb)
    cout << "first";
  else {
    int i = 0, j = 0;
    while (i < ca && j < cb) {
      if (a[i] < b[i]) {
        cout << "second";
        return 0;
      } else if (a[i] > b[i]) {
        cout << "first";
        return 0;
      }
      i++, j++;
    }
    if (ca < cb)
      cout << "second";
    else if (ca == cb) {
      if (x > 0)
        cout << "first";
      else
        cout << "second";
    } else
      cout << "first";
  }
  return 0;
}
