#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  vector<int> b;
  bool last = true;
  for (int i = 0; i < n; i++) {
    int v;
    cin >> v;
    if (v > 0)
      a.push_back(v);
    else
      b.push_back(-v);
    if (v > 0)
      last = true;
    else
      last = false;
  }
  long long op1 = 0;
  long long op2 = 0;
  for (auto v : a) op1 += v;
  for (auto v : b) op2 += v;
  if (op1 != op2) {
    cout << (op1 > op2 ? "first" : "second") << endl;
  } else {
    for (int i = 0; i < a.size() && i < b.size(); i++) {
      if (a[i] != b[i]) {
        cout << (a[i] > b[i] ? "first" : "second") << endl;
        return 0;
      }
    }
    cout << (last ? "first" : "second") << endl;
  }
  return 0;
}
