#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, p, w;
  long long a[100000], b[100000], x, ta, tb;
  ta = tb = i = j = 0;
  scanf("%d", &n);
  while (n--) {
    scanf("%lld", &x);
    if (x > 0) {
      a[i++] = x;
      ta += a[i - 1];
    } else {
      b[j++] = -x;
      tb += b[j - 1];
    }
  }
  if (ta > tb)
    printf("first");
  else if (ta < tb)
    printf("second");
  else {
    w = 0;
    for (p = 0; p < min(i, j) && w == 0; p++) {
      if (a[p] > b[p])
        w = 1;
      else if (a[p] < b[p])
        w = 2;
    }
    if (w == 1)
      printf("first");
    else if (w == 2)
      printf("second");
    else {
      if (x > 0)
        printf("first");
      else
        printf("second");
    }
  }
}
