#include <bits/stdc++.h>
using namespace std;
long long arr[100100], n, ans, temp, num, sum1, sum2;
vector<long long> fi, se;
int main() {
  bool ok = false;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> num;
    if (num < 0)
      se.push_back(-1 * num), ok = true;
    else
      fi.push_back(num), ok = false;
  }
  for (int i = 0; i < fi.size(); i++) sum1 += fi[i];
  for (int i = 0; i < se.size(); i++) sum2 += se[i];
  if (sum1 > sum2)
    cout << "first" << endl;
  else if (sum2 > sum1)
    cout << "second" << endl;
  else {
    for (int i = 0; i < min(fi.size(), se.size()); i++) {
      if (fi[i] > se[i]) {
        cout << "first" << endl;
        return 0;
      } else if (fi[i] < se[i]) {
        cout << "second" << endl;
        return 0;
      }
    }
    if (fi.size() > se.size())
      cout << "first" << endl;
    else if (se.size() > fi.size())
      cout << "second" << endl;
    else {
      if (ok)
        cout << "second" << endl;
      else
        cout << "first" << endl;
    }
  }
  return 0;
}
