#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200006;
int a[MAXN], b[MAXN];
int N;
int main() {
  while (scanf("%d", &N) != EOF) {
    int i, j;
    int x;
    int n = 0, m = 0;
    long long suma = 0, sumb = 0;
    int win = 0;
    int last;
    for (i = 1; i <= N; i++) {
      scanf("%d", &x);
      if (x > 0) {
        a[++n] = x;
        suma += x;
        last = 1;
      } else {
        b[++m] = -x;
        sumb += (-x);
        last = 2;
      }
    }
    if (suma > sumb)
      win = 1;
    else if (suma < sumb)
      win = 2;
    else {
      for (i = 1, j = 1; i <= n && j <= m; i++, j++) {
        if (a[i] > b[j]) {
          win = 1;
          break;
        } else if (a[i] < b[j]) {
          win = 2;
          break;
        }
      }
      if (i > n && j > m)
        win = last;
      else if (i > n && j <= m)
        win = 2;
      else if (i <= n && j > m)
        win = 1;
    }
    if (win == 1)
      printf("first\n");
    else if (win == 2)
      printf("second\n");
  }
  return 0;
}
