#include <bits/stdc++.h>
using namespace std;
long long a[200005], b[200005];
int main() {
  long long suma = 0, sumb = 0;
  int n, x, f, i;
  scanf("%d", &n);
  a[0] = b[0] = 0;
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    if (x > 0) {
      suma += x;
      a[++a[0]] = x;
    } else {
      sumb += -x;
      b[++b[0]] = -x;
    }
  }
  if (suma > sumb)
    f = 1;
  else if (suma < sumb)
    f = 0;
  else {
    for (i = 1; i <= max(a[0], b[0]); i++) {
      if (a[i] != b[i]) break;
    }
    if (a[i] > b[i])
      f = 1;
    else if (a[i] < b[i])
      f = 0;
    else {
      if (x > 0)
        f = 1;
      else
        f = 0;
    }
  }
  if (f)
    printf("first\n");
  else
    printf("second\n");
  return 0;
}
