#include <bits/stdc++.h>
using namespace std;
inline int input() {
  int n;
  cin >> n;
  return n;
}
long long pw(long long a, long long b) {
  return (!b ? 1 : (b & 1 ? a * pw(a * a, b / 2) : pw(a * a, b / 2)));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> f, s;
  long long a[n], sf = 0, ss = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > 0) f.push_back(a[i]), sf += a[i];
    if (a[i] < 0) s.push_back(abs(a[i])), ss += abs(a[i]);
  }
  cout << (ss < sf || (ss == sf && s < f) ||
                   (ss == sf && s == f && a[n - 1] > 0)
               ? "first"
               : "second")
       << endl;
  return 0;
}
