#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a[211111], i, s = 0, s1 = 0;
  vector<long long> v[11];
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] > 0) {
      s += a[i];
      v[1].push_back(a[i]);
    } else {
      s1 -= a[i];
      v[2].push_back(a[i]);
    }
  }
  if (s > s1) {
    cout << "first";
    return 0;
  }
  if (s < s1) {
    cout << "second";
    return 0;
  }
  for (i = 0; i < min(v[1].size(), v[2].size()); i++) {
    if (v[1][i] < -v[2][i]) {
      cout << "second";
      return 0;
    }
    if (v[1][i] > -v[2][i]) {
      cout << "first";
      return 0;
    }
  }
  if (i == v[1].size() && i == v[2].size()) {
    if (a[n] > 0)
      cout << "first";
    else
      cout << "second";
    return 0;
  }
  if (i == v[1].size()) {
    cout << "second";
  } else
    cout << "first";
}
