#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int a[N], b[N];
int check(int a[], int n1, int b[], int n2) {
  for (int i = 0; i < max(n1, n2); ++i) {
    if (i >= n1)
      return -1;
    else if (i >= n2)
      return 1;
    else if (a[i] > b[i])
      return 1;
    else if (a[i] < b[i])
      return -1;
  }
  return 0;
}
int cmp(int a[], int n1, int b[], int n2) {
  long long sum1 = 0, sum2 = 0;
  for (int i = 0; i < n1; ++i) sum1 += a[i];
  for (int i = 0; i < n2; ++i) sum2 += b[i];
  if (sum1 > sum2)
    return 1;
  else if (sum1 < sum2)
    return -1;
  return check(a, n1, b, n2);
}
int main() {
  int n;
  scanf("%d", &n);
  int last, n1 = 0, n2 = 0;
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    if (x > 0) {
      a[n1++] = x;
      last = 0;
    } else {
      b[n2++] = -x;
      last = 1;
    }
  }
  int flag = 0;
  int t = cmp(a, n1, b, n2);
  if ((t > 0) || (t == 0 && last == 0)) flag = 1;
  if (flag)
    puts("first");
  else
    puts("second");
  return 0;
}
