#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, i, f = 0, s = 0;
  cin >> n;
  long long a[n];
  vector<long long> v1;
  vector<long long> v2;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > 0) {
      f = f + a[i];
      v1.push_back(a[i]);
    } else {
      s = s + a[i];
      v2.push_back(abs(a[i]));
    }
  }
  s = -1 * s;
  if (s > f)
    cout << "second";
  else if (s < f)
    cout << "first";
  else {
    long long m = min(v1.size(), v2.size());
    for (long long i = 0; i < m; i++) {
      if (v1[i] > v2[i]) {
        cout << "first";
        return 0;
      }
      if (v1[i] < v2[i]) {
        cout << "second";
        return 0;
      }
    }
    if (v1.size() > v2.size())
      cout << "first";
    else if (v1.size() < v2.size())
      cout << "second";
    else {
      if (a[n - 1] > 0)
        cout << "first";
      else
        cout << "second";
    }
  }
}
