#include <bits/stdc++.h>
using namespace std;
long long n, a[200005], t1 = 0, t2 = 0;
long long n1 = 0, n2 = 0, b[200005], c[200005];
void input() {
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
}
void output() {}
void solve() {
  for (long long i = 1; i <= n; i++) {
    if (a[i] > 0) {
      t1 += a[i];
      n1++;
      b[n1] = a[i];
    } else if (a[i] < 0) {
      t2 += abs(a[i]);
      n2++;
      c[n2] = abs(a[i]);
    }
  }
  if (t1 > t2)
    cout << "first";
  else if (t2 > t1)
    cout << "second";
  else {
    long long i = 1;
    while (b[i] == c[i]) {
      i++;
    }
    if (n1 != n2 && i == n1 + 1)
      cout << "second";
    else if (n1 != n2 && i == n2 + 1)
      cout << "first";
    else if (i <= n1 && i <= n2) {
      if (b[i] > c[i])
        cout << "first";
      else
        cout << "second";
    } else {
      if (a[n] > 0)
        cout << "first";
      else
        cout << "second";
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  input();
  solve();
  output();
}
