#include <bits/stdc++.h>
using namespace std;
vector<int> first, second;
int main(int argc, char const *argv[]) {
  long long sum1 = 0;
  long long sum2 = 0;
  int count;
  cin >> count;
  int point;
  int last;
  for (int i = 0; i < count; i++) {
    cin >> point;
    last = point;
    if (point > 0) {
      sum1 += point;
      first.push_back(point);
    } else {
      sum2 += abs(point);
      second.push_back(abs(point));
    }
  }
  if (sum1 > sum2) {
    cout << "first" << endl;
    return 0;
  } else if (sum1 < sum2) {
    cout << "second" << endl;
    return 0;
  }
  bool simil = false;
  int j = -1;
  for (int i = 0; i < min(first.size(), second.size()); i++) {
    if ((first[i] == second[i]) &&
        (i == min(first.size(), second.size()) - 1)) {
      simil = true;
    } else if (first[i] == second[i]) {
      j = i;
      continue;
    } else {
      j++;
      break;
    }
  }
  if (simil) {
    if (first.size() == second.size()) {
      if (last < 0) {
        cout << "second" << endl;
      } else {
        cout << "first" << endl;
      }
    } else if (first.size() > second.size()) {
      cout << "first" << endl;
    } else {
      cout << "second" << endl;
    }
    return 0;
  }
  if (first[j] > second[j]) {
    cout << "first" << endl;
  } else {
    cout << "second" << endl;
  }
  return 0;
}
