#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long> first;
  vector<long long> second;
  long long techniqueCnt;
  cin >> techniqueCnt;
  long long sum = 0;
  long long last;
  for (long long i = 0; i < techniqueCnt; ++i) {
    cin >> last;
    if (last > 0) {
      first.push_back(last);
    } else {
      second.push_back(last);
    }
    sum += last;
  }
  if (sum > 0) {
    cout << "first\n";
    return 0;
  } else if (sum < 0) {
    cout << "second\n";
    return 0;
  } else {
    for (long long i = 0; i < min(first.size(), second.size()); ++i) {
      if (abs(first[i]) < abs(second[i])) {
        cout << "second\n";
        return 0;
      } else if (abs(first[i]) > abs(second[i])) {
        cout << "first\n";
        return 0;
      } else
        continue;
    }
    if (last < 0) {
      cout << "second\n";
      return 0;
    } else {
      cout << "first\n";
      return 0;
    }
  }
  return 0;
}
