#include <bits/stdc++.h>
using namespace std;
long long int a, toty, totx, ans, lst;
vector<long long int> x, y;
int main() {
  ios_base::sync_with_stdio(false);
  long long int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (i == n - 1) lst = a;
    if (a > 0) {
      x.push_back(a);
      totx += a;
    } else {
      a *= -1;
      y.push_back(a);
      toty += a;
    }
  }
  if (totx > toty) {
    cout << "first" << endl;
    return 0;
  } else if (totx < toty) {
    cout << "second" << endl;
    return 0;
  }
  for (int i = 0; i < min(x.size(), y.size()); i++) {
    if (x[i] > y[i]) {
      ans = 1;
      break;
    } else if (x[i] < y[i]) {
      ans = 2;
      break;
    }
  }
  if (ans == 1 || ((ans == 0) && (x.size() > y.size()))) {
    cout << "first" << endl;
    return 0;
  } else if (ans == 2 || ((ans == 0) && (y.size() > x.size()))) {
    cout << "second" << endl;
    return 0;
  }
  if (lst > 0) {
    cout << "first" << endl;
  } else {
    cout << "second" << endl;
  }
  return 0;
}
