#include <bits/stdc++.h>
using namespace std;
const int MAXN = 110000;
int main() {
  ios::sync_with_stdio(false);
  cout.precision(10);
  cout << fixed;
  long long first_score = 0, second_score = 0;
  vector<int> h1, h2;
  int n;
  cin >> n;
  bool first = false;
  for (int i = 0; i < (int)(n); ++i) {
    int tmp;
    cin >> tmp;
    if (tmp > 0) {
      h1.push_back(tmp);
      first_score += tmp;
      first = true;
    } else {
      h2.push_back(-tmp);
      second_score += (-tmp);
      first = false;
    }
  }
  if (first_score > second_score) {
    cout << "first";
  } else if (second_score > first_score) {
    cout << "second";
  } else if (h1 > h2) {
    cout << "first";
  } else if (h1 < h2) {
    cout << "second";
  } else {
    cout << (first ? "first" : "second");
  }
  return 0;
}
