#include <bits/stdc++.h>
using namespace std;
int h[222222];
int f[222222], s[222222];
int main() {
  int n;
  cin >> n;
  int fcnt = 0, scnt = 0;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> h[i];
    if (h[i] > 0)
      f[fcnt++] = h[i];
    else
      s[scnt++] = -h[i];
    sum += h[i];
  }
  if (sum > 0) {
    cout << "first";
  } else if (sum < 0) {
    cout << "second";
  } else {
    for (int i = 0; i < min(fcnt, scnt); i++) {
      if (f[i] == s[i]) continue;
      if (f[i] > s[i]) {
        cout << "first";
        return 0;
      } else {
        cout << "second";
        return 0;
      }
    }
    if (h[n - 1] < 0)
      cout << "second";
    else
      cout << "first";
  }
  return 0;
}
