#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int temp;
  vector<int> a, b;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    if (temp < 0) {
      b.push_back(-temp);
      temp = 2;
    } else {
      a.push_back(temp);
      temp = 1;
    }
  }
  long long int a_sum = 0;
  for (int i = 0; i < a.size(); i++) {
    a_sum += a[i];
  }
  long long int b_sum = 0;
  for (int i = 0; i < b.size(); i++) {
    b_sum += b[i];
  }
  if (a_sum > b_sum) {
    cout << "first" << endl;
    return 0;
  } else if (b_sum > a_sum) {
    cout << "second" << endl;
    return 0;
  }
  for (int i = 0; i < min(a.size(), b.size()); i++) {
    if (a[i] > b[i]) {
      cout << "first" << endl;
      return 0;
    } else if (a[i] < b[i]) {
      cout << "second" << endl;
      return 0;
    }
  }
  if (temp == 1) {
    cout << "first" << endl;
  } else {
    cout << "second" << endl;
  }
  return 0;
}
