#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> pos, neg;
  long long possum = 0, negsum = 0;
  long long arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] >= 0) {
      possum += arr[i];
      pos.push_back(arr[i]);
    } else {
      negsum += (-1 * arr[i]);
      neg.push_back(-1 * arr[i]);
    }
  }
  if (possum > negsum)
    cout << "first" << endl;
  else if (negsum > possum)
    cout << "second" << endl;
  else {
    int u = 0;
    for (int i = 0; i < min(pos.size(), neg.size()); i++) {
      if (pos[i] > neg[i]) {
        u = 1;
        cout << "first" << endl;
        break;
      } else if (pos[i] < neg[i]) {
        u = 1;
        cout << "second" << endl;
        break;
      }
    }
    if (u == 0) {
      if (pos.size() > neg.size())
        cout << "first" << endl;
      else if (pos.size() < neg.size())
        cout << "second" << endl;
      else {
        if (arr[n - 1] < 0)
          cout << "second" << endl;
        else
          cout << "first" << endl;
      }
    }
  }
  return 0;
}
