#include <bits/stdc++.h>
using namespace std;
int N, i, j;
long long M, P, A[200000], As, B[200000], Bs;
bool lst;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N;
  for (i = 0; i < N; i++) {
    cin >> M;
    P += M;
    if (M > 0) {
      A[As] = M;
      As++;
      lst = 1;
    } else {
      B[Bs] = -M;
      Bs++;
      lst = 0;
    }
  }
  if (P > 0) {
    cout << "first\n";
  } else if (P < 0) {
    cout << "second\n";
  } else {
    for (i = 0; i < 100000; i++) {
      if (A[i] > B[i]) {
        cout << "first\n";
        return 0;
      }
      if (A[i] < B[i]) {
        cout << "second\n";
        return 0;
      }
    }
    if (lst) {
      cout << "first\n";
    } else {
      cout << "second\n";
    }
  }
}
