#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, c, san, cc = 0, dd = 0;
  cin >> a;
  vector<int> v;
  vector<int> g;
  for (int i = 0; i < a; i++) {
    cin >> c;
    if (c > 0) {
      san = 1;
      cc = cc + c;
      v.push_back(c);
    } else {
      san = 0;
      dd = dd + abs(c);
      g.push_back(abs(c));
    }
  }
  int ye = 0;
  if (dd == cc) {
    for (int i = 0; i < min(v.size(), g.size()); i++) {
      if (v[i] > g[i]) {
        ye++;
        cout << "first" << endl;
        i = min(v.size(), g.size());
      } else if (v[i] < g[i]) {
        ye++;
        cout << "second" << endl;
        i = min(v.size(), g.size());
      }
    }
    if (ye == 0) {
      if (san == 0)
        cout << "second" << endl;
      else
        cout << "first" << endl;
    }
  } else if (dd > cc)
    cout << "second" << endl;
  else
    cout << "first" << endl;
  return 0;
}
