#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long maxn = 1e5 + 10;
long long suma, sumb, las, n;
vector<int> a, b;
long long did() {
  long long len = min(a.size(), b.size());
  for (long long i = 0; i < len; ++i) {
    if (a[i] > b[i]) return 1;
    if (a[i] < b[i]) return 2;
  }
  return 3;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    if (x > 0) {
      a.push_back(x);
      suma = suma + x;
      las = 1;
    } else {
      b.push_back(-x);
      sumb = sumb + (-x);
      las = 2;
    }
  }
  if (suma > sumb)
    printf("first\n");
  else if (suma < sumb)
    printf("second\n");
  else {
    int op = did();
    if (op == 1) {
      printf("first\n");
    } else if (op == 2) {
      printf("second\n");
    } else {
      if (las == 1)
        printf("first\n");
      else if (las == 2)
        printf("second\n");
    }
  }
  return 0;
}
