#include <bits/stdc++.h>
using namespace std;
long long a[400011], b[400010], n1, n2, n, t1, t2, aa;
int main() {
  cin >> n;
  t1 = 0;
  t2 = 0;
  for (long long i = 1; i <= n; ++i) {
    cin >> aa;
    if (aa >= 0) {
      ++n1;
      a[n1] = aa;
      t1 = t1 + aa;
    }
    if (aa < 0) {
      ++n2;
      b[n2] = -aa;
      t2 = t2 - aa;
    }
  }
  if (t1 > t2) {
    cout << "first";
    return 0;
  }
  if (t2 > t1) {
    cout << "second";
    return 0;
  }
  for (long long i = 1; i <= max(n1, n2); ++i) {
    if (a[i] > b[i]) {
      cout << "first";
      return 0;
    }
    if (b[i] > a[i]) {
      cout << "second";
      return 0;
    }
  }
  if (aa < 0)
    cout << "second";
  else
    cout << "first";
}
