#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  std::ios::sync_with_stdio(false);
  long long k, n, sum = 0, sum2 = 0;
  string s1, s2, s;
  vector<long long> a, a1;
  int x;
  cin >> k;
  for (int i = 0; i < k; i++) {
    cin >> n;
    if (n > 0) {
      a.push_back(n);
      sum += n;
    } else {
      a1.push_back(-n);
      sum2 += -n;
    }
  }
  if (sum < sum2) {
    cout << "second" << endl;
  } else if (sum > sum2) {
    cout << "first" << endl;
  } else {
    for (int i = 0; i < min(a.size(), a1.size()); i++) {
      if (a[i] < a1[i]) {
        cout << "second" << endl;
        return 0;
      } else if (a[i] > a1[i]) {
        cout << "first" << endl;
        return 0;
      }
    }
    if (n > 0)
      cout << "first" << endl;
    else
      cout << "second" << endl;
  }
  return 0;
}
