#include <bits/stdc++.h>
using namespace std;
long long n, x, i, aux2, suma, b[200005], c[200005], aux;
int main() {
  int cont1 = 0, cont2 = 0;
  cin >> n;
  while (i < n) {
    cin >> x;
    if (x > 0) {
      b[cont1] = x;
      cont1++;
    } else {
      c[cont2] = -x;
      cont2++;
    }
    suma += x;
    i++;
    if (i == n) {
      aux = x;
    }
  }
  i = 0;
  if (suma > 0) {
    cout << "first";
    return 0;
  } else if (suma < 0) {
    cout << "second";
    return 0;
  }
  while (i < min(cont1, cont2)) {
    if (b[i] != c[i]) {
      aux2 = 1;
    }
    i++;
  }
  i = 0;
  if (aux2 == 0) {
    if (cont1 > cont2) {
      cout << "first";
      return 0;
    } else if (cont1 < cont2) {
      cout << "second";
      return 0;
    }
  }
  while (i < max(cont1, cont2)) {
    if (b[i] > c[i]) {
      cout << "first";
      return 0;
    } else if (b[i] < c[i]) {
      cout << "second";
      return 0;
    }
    i++;
  }
  i = 0;
  if (aux > 0) {
    cout << "first";
    return 0;
  } else {
    cout << "second";
    return 0;
  }
}
