#include <bits/stdc++.h>
using namespace std;
int solve() {
  long long n;
  cin >> n;
  vector<long long int> a, b;
  long long x;
  for (long long int i = 0; i < n; i++) {
    cin >> x;
    if (x > 0)
      a.push_back(x);
    else
      b.push_back(x);
  }
  long long sum1 = accumulate(a.begin(), a.end(), (long long)0);
  long long sum2 = abs(accumulate(b.begin(), b.end(), (long long)0));
  if (sum1 > sum2)
    cout << "first";
  else if (sum2 > sum1)
    cout << "second";
  else {
    long long s = min((long long int)a.size(), (long long int)b.size());
    for (long long int i = 0; i < s; i++) {
      if (a[i] > abs(b[i])) {
        cout << "first";
        return 0;
      } else if (a[i] < abs(b[i])) {
        cout << "second";
        return 0;
      }
    }
    if (x > 0)
      cout << "first";
    else
      cout << "second";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
}
