#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, b = 0, a = 0, u, c = 0, d = 0;
  cin >> n;
  vector<int> va, vb;
  bool last = false, flag = true, same = false;
  for (int i = 1; i <= n; i++) {
    cin >> u;
    if (u > 0) {
      va.push_back(u);
      c += u;
      last = false;
    } else {
      vb.push_back(abs(u));
      d += abs(u);
      last = true;
    }
  }
  a = va.size(), b = vb.size();
  if (c > d) {
    cout << "first" << endl;
    return 0;
  }
  if (c < d) {
    cout << "second" << endl;
    return 0;
  } else if (c == d) {
    int m = min(a, b);
    for (int i = 0; i < m; i++) {
      if (va[i] > vb[i]) {
        cout << "first" << endl;
        return 0;
      } else if (va[i] < vb[i]) {
        cout << "second" << endl;
        return 0;
      }
    }
    same = true;
  }
  if (same) {
    if (!last)
      cout << "first" << endl;
    else
      cout << "second" << endl;
  }
}
