#include <bits/stdc++.h>
using namespace std;
long long int ara[200005];
int main() {
  long long int n, i, sum1 = 0, sum2 = 0;
  vector<long long int> v1, v2;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> ara[i];
    if (ara[i] >= 0) {
      v1.push_back(ara[i]);
      sum1 += ara[i];
    } else {
      v2.push_back(-ara[i]);
      sum2 += -ara[i];
    }
  }
  if (sum1 > sum2) {
    cout << "first" << endl;
    return 0;
  }
  if (sum1 < sum2) {
    cout << "second" << endl;
    return 0;
  }
  long long int l = min(v1.size(), v2.size());
  for (i = 0; i < l; i++) {
    if (v1[i] > v2[i]) {
      cout << "first" << endl;
      return 0;
    }
    if (v1[i] < v2[i]) {
      cout << "second" << endl;
      return 0;
    }
  }
  if (v1.size() > v2.size()) {
    cout << "first" << endl;
    return 0;
  }
  if (v1.size() < v2.size()) {
    cout << "second" << endl;
    return 0;
  }
  if (v1.size() == v2.size()) {
    if (ara[n - 1] >= 0) {
      cout << "first" << endl;
    } else {
      cout << "second" << endl;
    }
    return 0;
  }
  return 0;
}
