#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> f, s;
  long long last, sum = 0;
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    sum += a;
    if (a < 0)
      s.push_back(a);
    else
      f.push_back(a);
    if (i == n - 1) last = a < 0 ? 0 : 1;
  }
  if (sum > 0)
    cout << "first\n";
  else if (sum < 0)
    cout << "second\n";
  else {
    for (long long i = 0; i < min(f.size(), s.size()); i++) {
      if (f[i] > abs(s[i])) {
        cout << "first\n";
        return;
      } else if (f[i] < abs(s[i])) {
        cout << "second\n";
        return;
      }
    }
    if (last == 0)
      cout << "second\n";
    else
      cout << "first\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) solve();
  return 0;
}
