#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int a[n], x[n], y[n], p = 0, q = 0, sumx = 0, sumy = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > 0) {
      x[p] = a[i];
      p++;
      sumx += a[i];
    } else if (a[i] < 0) {
      int f = abs(a[i]);
      y[q] = f;
      q++;
      sumy += f;
    }
  }
  int temp = min(p, q);
  if (sumx > sumy) {
    cout << "first";
    return 0;
  } else if (sumx < sumy) {
    cout << "second";
    return 0;
  } else {
    for (int i = 0; i < temp; i++) {
      if (x[i] > y[i]) {
        cout << "first";
        return 0;
      } else if (x[i] < y[i]) {
        cout << "second";
        return 0;
      }
    }
    if (a[n - 1] > 0) {
      cout << "first";
      return 0;
    }
    cout << "second";
    return 0;
  }
}
