#include <bits/stdc++.h>
using namespace std;
int main() {
  string f = "first", s = "second";
  int n, x;
  cin >> n;
  vector<int> a, b;
  for (int i = 0; i < n; i++) {
    cin >> x;
    (x > 0 ? a.push_back(x) : b.push_back(x));
  }
  long long sumf = 0, sums = 0;
  vector<int>::iterator i;
  for (i = a.begin(); i != a.end(); i++) sumf += *i;
  for (i = b.begin(); i != b.end(); i++) sums += *i;
  sums = -sums;
  if (sumf > sums) {
    cout << f;
    return 0;
  }
  if (sums > sumf) {
    cout << s;
    return 0;
  }
  int t = (a.size() > b.size() ? b.size() : a.size());
  for (int j = 0; j < t; j++) {
    b[j] = -b[j];
    if (a[j] > b[j]) {
      cout << f;
      return 0;
    } else if (b[j] > a[j]) {
      cout << s;
      return 0;
    }
  }
  if (a.size() > b.size()) {
    cout << f;
    return 0;
  } else if (b.size() > a.size()) {
    cout << s;
    return 0;
  }
  cout << (x > 0 ? f : s);
  return 0;
}
