#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, no, s = 0, t = 0, m;
  vector<long long> v1, v;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> no;
    m = no;
    if (no > 0) {
      v.push_back(no);
      s += no;
    } else {
      no *= -1;
      v1.push_back(no);
      t += (no);
    }
  }
  if (s > t) {
    cout << "first";
    return 0;
  } else if (t > s) {
    cout << "second";
    return 0;
  }
  if (v > v1) {
    cout << "first";
    return 0;
  } else if (v1 > v) {
    cout << "second";
    return 0;
  }
  if (m > 0) {
    cout << "first";
    return 0;
  } else {
    cout << "second";
    return 0;
  }
}
