#include <bits/stdc++.h>
using namespace std;
long long a[200005];
long long k1[200005];
long long k2[200005];
string ss = "first";
string sp = "second";
int main() {
  int n;
  cin >> n;
  int r1 = 0;
  int r2 = 0;
  long long s1 = 0;
  long long s2 = 0;
  int l1 = 0;
  int l2 = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > 0) {
      { k1[l1++] = a[i]; }
      s1 += a[i];
      r1 = 1;
    } else {
      { k2[l2++] = -a[i]; }
      s2 += -a[i];
      r1 = 0;
    }
  }
  if (s1 > s2) {
    cout << ss << endl;
    return 0;
  }
  if (s1 < s2) {
    cout << sp << endl;
    return 0;
  }
  if (s1 == s2) {
    for (int i = 0; i < min(l1, l2); i++) {
      if (k1[i] > k2[i]) {
        cout << ss << endl;
        return 0;
      }
      if (k2[i] > k1[i]) {
        cout << sp << endl;
        return 0;
      }
    }
    if (!r1) {
      cout << sp << endl;
      return 0;
    } else {
      cout << ss << endl;
      return 0;
    }
  }
}
