#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> a, b;
    long long suma = 0, sumb = 0;
    long long l;
    while (n--) {
      long long k;
      cin >> k;
      if (k < 0)
        a.push_back(-k), suma += abs(k), l = 1;
      else
        b.push_back(k), sumb += k, l = 0;
    }
    if (suma < sumb)
      cout << "first";
    else if (sumb < suma)
      cout << "second";
    else {
      for (long long i = 0; i < min(a.size(), b.size()); i++) {
        if (a[i] < b[i]) {
          cout << "first";
          return 0;
        }
        if (b[i] < a[i]) {
          cout << "second";
          return 0;
        }
      }
      if (!l)
        cout << "first";
      else
        cout << "second";
    }
  }
  return 0;
}
