#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, sum = 0, t, f = 1;
  cin >> n;
  vector<long long> first, second;
  while (--n) {
    cin >> t;
    sum += t;
    (t > 0) ? first.push_back(t) : second.push_back(-1 * t);
  }
  cin >> t;
  sum += t;
  if (t > 0)
    first.push_back(t);
  else {
    second.push_back(-1 * t);
    f = 0;
  }
  if (sum > 0)
    cout << "first";
  else if (sum < 0)
    cout << "second";
  else if (first > second)
    cout << "first";
  else if (second > first)
    cout << "second";
  else if (f)
    cout << "first";
  else
    cout << "second";
}
