#include <bits/stdc++.h>
using namespace std;
void check(vector<long long> a, vector<long long> b, long long n) {
  long long x = min(a.size(), b.size());
  long long y;
  for (long long i = (long long)0; i < (long long)x; i++) {
    if (a[i] > b[i]) {
      y = 1;
      break;
    } else if (b[i] > a[i]) {
      y = 2;
      break;
    } else {
      y = 0;
    }
  }
  if (y == 1)
    cout << "first" << '\n';
  else if (y == 2)
    cout << "second" << '\n';
  else {
    if (a.size() != b.size() && a.size() > b.size()) {
      cout << "first" << '\n';
    } else if (a.size() != b.size() && a.size() < b.size()) {
      cout << "second" << '\n';
    } else if (a.size() == b.size() && n == 1) {
      cout << "first" << '\n';
    } else if (a.size() == b.size() && n == 2) {
      cout << "second" << '\n';
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long sum = 0, cnt;
  vector<long long> p, np;
  for (long long i = (long long)0; i < (long long)n; i++) {
    long long a;
    cin >> a;
    sum += a;
    if (a > 0) {
      p.push_back(a);
      cnt = 1;
    } else {
      a = 0 - a;
      np.push_back(a);
      cnt = 2;
    }
  }
  if (sum == 0) {
    check(p, np, cnt);
  } else {
    if (sum > 0)
      cout << "first" << '\n';
    else
      cout << "second" << '\n';
  }
  return 0;
}
