#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int n;
  cin >> n;
  long long int a[n];
  long long int sum1 = 0, sum2 = 0;
  vector<int> v1, v2;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    if (a[i] >= 0) {
      v1.push_back(a[i]);
      sum1 += a[i];
    } else {
      v2.push_back(-1 * a[i]);
      sum2 += a[i] * -1;
    }
  }
  if (sum1 > sum2)
    cout << "first";
  else if (sum2 > sum1)
    cout << "second";
  else {
    if (v1 > v2)
      cout << "first";
    else if (v2 > v1)
      cout << "second";
    else {
      if (a[n - 1] >= 0)
        cout << "first";
      else
        cout << "second";
    }
  }
  return 0;
}
