#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x;
  long long sum = 0;
  cin >> n;
  vector<long long> a;
  vector<long long> b;
  for (int i = 0; i < n; i++) {
    cin >> x;
    sum += x;
    if (x > 0) {
      a.push_back(x);
    } else {
      b.push_back(abs(x));
    }
  }
  if (sum > 0) {
    cout << "first";
  } else if (sum < 0) {
    cout << "second";
  } else {
    if (a == b) {
      if (x > 0)
        cout << "first";
      else
        cout << "second";
      return 0;
    } else if (a > b) {
      cout << "first";
    } else {
      cout << "second";
    }
  }
}
