#include <bits/stdc++.h>
using namespace std;
bool f(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  long long sum = 0, sum1 = 0;
  string a = "", b = "";
  char l = 'f';
  vector<long long> A, B;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (x > 0) {
      sum += x;
      l = 'f';
      a += to_string(x);
      A.push_back(x);
    } else {
      sum1 += abs(x);
      b += to_string(abs(x));
      l = 's';
      B.push_back(abs(x));
    }
  }
  if (sum > sum1) {
    cout << "first";
  } else if (sum1 > sum) {
    cout << "second";
  } else {
    for (long long i = 0; i < min(A.size(), B.size()); i++) {
      if (A[i] > B[i]) {
        cout << "first";
        return 0;
      } else if (B[i] > A[i]) {
        cout << "second";
        return 0;
      }
    }
    if (a.length() > b.length()) {
      cout << "first";
    } else if (b.length() > a.length()) {
      cout << "second";
    } else {
      if (l == 's') {
        cout << "second";
      } else {
        cout << "first";
      }
    }
  }
}
