#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, temp, sum = 0;
  vector<long long> first, second;
  cin >> n;
  while (n--) {
    cin >> temp;
    if (temp > 0) {
      first.push_back(temp);
    } else {
      temp *= -1;
      second.push_back(temp);
      temp *= -1;
    }
    sum += temp;
  }
  if (sum > 0)
    cout << "first" << endl;
  else if (sum < 0)
    cout << "second" << endl;
  else {
    long long SIZE = max(first.size(), second.size());
    for (long long i = 0; i < SIZE; i++) {
      if (first[i] > second[i]) {
        cout << "first" << endl;
        return 0;
      } else if (first[i] < second[i]) {
        cout << "second" << endl;
        return 0;
      }
    }
    if (temp > 0)
      cout << "first" << endl;
    else
      cout << "second" << endl;
  }
  return 0;
}
