#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  long long t1 = 0, t2 = 0;
  vector<long long> v1, v2;
  long long t;
  for (long long i = 0; i < n; ++i) {
    cin >> t;
    if (t > 0) {
      t1 += t;
      v1.push_back(t);
    } else {
      t2 -= t;
      v2.push_back(-t);
    }
  }
  long long f = 0;
  if (t1 > t2)
    f = 1;
  else if (t1 < t2)
    f = 2;
  else {
    bool ff = 0;
    for (long long i = 0; i < min(v1.size(), v2.size()); ++i) {
      if (v1[i] > v2[i]) {
        ff = 1;
        f = 1;
        break;
      } else if (v1[i] < v2[i]) {
        ff = 1;
        f = 2;
        break;
      }
    }
    if (!ff) {
      if (t > 0)
        f = 1;
      else
        f = 2;
    }
  }
  if (f == 1)
    cout << "first";
  else
    cout << "second";
  return 0;
}
