#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j = 0, k = 0;
  cin >> n;
  long long int b[500100] = {0}, c[500100] = {0}, sum1 = 0, sum2 = 0, m = 0;
  for (i = 0; i < n; i++) {
    long long int z;
    cin >> z;
    if (z > 0) {
      b[j++] = z;
      sum1 = sum1 + z;
      m = 0;
    } else {
      c[k++] = -1 * z;
      sum2 = sum2 + (-1) * z;
      m = 1;
    }
  }
  if (sum1 > sum2) {
    cout << "first";
    return 0;
  }
  if (sum1 < sum2) {
    cout << "second";
    return 0;
  }
  for (i = 0; i < max(j, k); i++) {
    if (b[i] > c[i]) {
      cout << "first";
      return 0;
    }
    if (b[i] < c[i]) {
      cout << "second";
      return 0;
    }
  }
  if (m == 1) {
    cout << "second";
    return 0;
  } else {
    cout << "first";
    return 0;
  }
}
