#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> w1, w2;
  long long int n, x, i, p1 = 0, p2 = 0, b, l;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x;
    if (i == n - 1) {
      if (x > 0)
        b = 1;
      else
        b = 0;
    }
    if (x > 0) {
      p1 += x;
      w1.push_back(x);
    }
    if (x < 0) {
      p2 += abs(x);
      w2.push_back(abs(x));
    }
  }
  if (p1 > p2)
    cout << "first";
  else if (p1 < p2)
    cout << "second";
  else {
    l = min(w1.size(), w2.size());
    for (i = 0; i < l; i++) {
      if (w1[i] > w2[i]) {
        cout << "first";
        exit(0);
      } else if (w2[i] > w1[i]) {
        cout << "second";
        exit(0);
      }
    }
    if (w1.size() > w2.size()) {
      cout << "first";
      exit(0);
    } else if (w2.size() > w1.size()) {
      cout << "second";
      exit(0);
    } else {
      if (b == 1)
        cout << "first";
      else
        cout << "second";
    }
  }
  return 0;
}
