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