#include <bits/stdc++.h>
using namespace std;
long long int a[200003], b[200003];
int main() {
  long long int n, i, t, k1 = 0, k2 = 0, c1 = 0, c2 = 0, p1, p2;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> t;
    if (t > 0) {
      a[k1++] = t;
      c1 += t;
      p1 = i;
    } else {
      b[k2++] = t;
      c2 += t;
      p2 = i;
    }
  }
  i = 0;
  if (abs(c2) > c1) {
    cout << "second";
    return 0;
  } else if (abs(c2) < c1) {
    cout << "first";
    return 0;
  } else {
    while (true) {
      if (a[i] != abs(b[i]) || (a[i] == 0 && b[i] == 0)) {
        break;
      }
      i++;
    }
  }
  if (a[i] > abs(b[i])) {
    cout << "first";
    return 0;
  } else if (a[i] < abs(b[i])) {
    cout << "second";
    return 0;
  } else {
    if (p1 == n - 1) {
      cout << "first";
    } else {
      cout << "second";
    }
  }
  return 0;
}
