#include <bits/stdc++.h>
using namespace std;
typedef unsigned int UI;
typedef long int LI;
typedef unsigned long int ULI;
typedef long long int LL;
typedef unsigned long long int ULL;
LL mod = 1e9 + 7;
inline int scanInt() {
  int n = 0;
  char ch = getchar();
  int sign = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') sign = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    n = (n << 1) + (n << 3) + (int)(ch - '0');
    ch = getchar();
  }
  return n * sign;
}
inline LL scanLong() {
  LL n = 0;
  char ch = getchar();
  LL sign = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') sign = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    n = (n << 1) + (n << 3) + (LL)(ch - '0');
    ch = getchar();
  }
  return n * sign;
}
int main() {
  LL n = scanLong();
  ;
  vector<LL> first, second;
  LL sum = 0, last;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    LL p = scanLong();
    ;
    if (p > 0)
      first.push_back(p);
    else
      second.push_back(-p);
    sum += p;
    if (i + 1 == n) last = p;
  }
  if (sum > 0)
    puts("first");
  else if (sum < 0)
    puts("second");
  else if (sum == 0) {
    LL i = 0, j = 0;
    while (i < first.size() && j < second.size() && first[i] == second[j])
      i++, j++;
    if (i == first.size() && j == second.size()) {
      if (last > 0)
        puts("first");
      else if (last < 0)
        puts("second");
    } else if (i == first.size())
      puts("second");
    else if (j == second.size())
      puts("first");
    else {
      if (first[i] > second[j])
        puts("first");
      else if (first[i] < second[j])
        puts("second");
    }
  }
}
