#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v1, v2;
  int n;
  cin >> n;
  int a[200002];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 0)
      v2.push_back(abs(a[i]));
    else
      v1.push_back(a[i]);
  }
  long long f(0), s(0);
  for (int i = 0; i < n; i++) {
    if (a[i] < 0)
      s += abs(a[i]);
    else
      f += a[i];
  }
  if (s > f)
    cout << "second";
  else if (f > s)
    cout << "first";
  else {
    bool b = true;
    for (int i = 0; i < min(v1.size(), v2.size()); i++) {
      if (v1[i] > v2[i]) {
        cout << "first";
        b = false;
        break;
      } else if (v2[i] > v1[i]) {
        cout << "second";
        b = false;
        break;
      }
    }
    if (b) {
      if (a[n - 1] < 0)
        cout << "second";
      else
        cout << "first";
    }
  }
}
