#include <bits/stdc++.h>
using namespace std;
long long n, tmp, a[200015], b[200015], d1 = 0, d2 = 0;
unsigned long long t1 = 0, t2 = 0;
bool last;
int ss() {
  if (t1 > t2) return 1;
  if (t2 > t1) return 2;
  long long xxx = min(d1, d2);
  for (long long i = 0; i < xxx; i++) {
    if (a[i] > b[i])
      return 1;
    else if (b[i] > a[i])
      return 2;
  }
  if (d1 > xxx) return 1;
  if (d2 > xxx) return 2;
  if (last)
    return 1;
  else
    return 2;
}
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> tmp;
    if (tmp > 0) {
      a[d1] = tmp;
      d1++;
      t1 += tmp;
      last = true;
    } else {
      tmp = -tmp;
      b[d2] = tmp;
      d2++;
      t2 += tmp;
      last = false;
    }
  }
  tmp = ss();
  if (tmp == 1)
    cout << "first";
  else
    cout << "second";
  cout << endl;
}
