#include <bits/stdc++.h>
using namespace std;
vector<int> v1, v2;
int main() {
  int n, i, j, k, x, p1 = 0, p2 = 0, f = 0;
  long long sum1 = 0, sum2 = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    if (x > 0) {
      sum1 += x;
      v1.push_back(x);
    } else {
      sum2 += (-x);
      v2.push_back(-x);
    }
    if (i == n - 1 && x > 0) {
      f = 1;
    }
    if (i == n - 1 && x < 0) {
      f = 2;
    }
  }
  if (sum1 != sum2) {
    if (sum1 > sum2) {
      printf("first\n");
      return 0;
    } else {
      printf("second\n");
      return 0;
    }
  } else {
    if (v1 > v2) {
      printf("first\n");
    } else if (v1 < v2) {
      printf("second\n");
    } else {
      if (f == 2)
        printf("second\n");
      else
        printf("first\n");
      return 0;
    }
  }
  return 0;
}
