#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, sum{}, x;
  vector<int> v1, v2;
  cin >> n;
  while (n--) {
    cin >> x;
    sum += x;
    if (x > 0)
      v1.push_back(x);
    else
      v2.push_back(-x);
  }
  if (sum < 0 || (sum == 0 && v1 < v2) || (sum == 0 && v1 == v2 && x < 0))
    cout << "second" << endl;
  else
    cout << "first" << endl;
  return 0;
}
