#include <bits/stdc++.h>
int main() {
  long long int t, a = 0, b = 0, n, A[200005], B[200005], k = 0, u, j = 0, i;
  scanf("%lld", &t);
  while (t--) {
    scanf("%lld", &n);
    if (n > 0) {
      a = a + n;
      A[j++] = n;
    } else {
      b = b + n;
      B[k++] = n * -1;
    }
  }
  b = b * -1;
  if (a > b) {
    printf("first");
    return 0;
  } else if (b > a) {
    printf("second");
    return 0;
  } else {
    i = 0;
    while (A[i] == B[i] && i < j && i < k) i++;
    if (i < j && i < k) {
      if (A[i] > B[i]) {
        printf("first");
        return 0;
      } else if (B[i] > A[i]) {
        printf("second");
        return 0;
      }
    } else {
      if (n > 0)
        printf("first");
      else
        printf("second");
    }
  }
  return 0;
}
