#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long long> a1;
  vector<long long> a2;
  int n;
  cin >> n;
  long long a, s = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a > 0)
      a1.push_back(a);
    else
      a2.push_back(-a);
    s += a;
  }
  if (s > 0)
    cout << "first";
  else if (s < 0)
    cout << "second";
  else {
    int i = 0;
    int j = 0;
    bool f = false;
    while (i < a1.size() && j < a2.size()) {
      if (a1[i] > a2[j]) {
        f = true;
        cout << "first";
        break;
      } else if (a1[i] < a2[i]) {
        f = true;
        cout << "second";
        break;
      }
      i++;
      j++;
    }
    if (f == false)
      if (a > 0)
        cout << "first";
      else
        cout << "second";
  }
  return 0;
}
