#include <bits/stdc++.h>
using namespace std;
long long n, x, c, cnt;
vector<long long> v1, v2;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  while (n--) {
    cin >> x;
    if (x > 0)
      v1.push_back(x), c += x;
    else
      v2.push_back(abs(x)), cnt += abs(x);
  }
  if (c > cnt) {
    cout << "first\n";
    return 0;
  }
  if (cnt > c) {
    cout << "second\n";
    return 0;
  }
  bool a = 0;
  for (int i = 0; i < min(v1.size(), v2.size()); i++) {
    if (v1[i] > v2[i]) {
      cout << "first\n";
      return 0;
    } else if (v1[i] < v2[i]) {
      cout << "second\n";
      return 0;
    }
  }
  if (x < 0)
    cout << "second" << endl;
  else
    cout << "first" << endl;
  return 0;
}
