#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int i, rec, a, s1 = 0, s2 = 0;
  vector<long long int> v1, v2;
  for (i = 0; i < n; i++) {
    cin >> a;
    if (a < 0) {
      s2 = s2 + (-1) * a;
      rec = 2;
      v2.push_back(-1 * a);
    } else {
      s1 = s1 + a;
      rec = 1;
      v1.push_back(a);
    }
  }
  if (s1 > s2)
    cout << "first";
  else if (s2 > s1)
    cout << "second";
  else {
    long long int m = min(v1.size(), v2.size());
    long long int o = 0, t = 0, e = 0;
    for (i = 0; i < m; i++) {
      if (v1[i] > v2[i]) {
        o++;
        break;
      } else if (v2[i] > v1[i]) {
        t++;
        break;
      } else
        e++;
    }
    if (v1.size() > v2.size() && e == v2.size())
      cout << "first";
    else if (v2.size() > v1.size() && e == v1.size())
      cout << "second";
    else if (o > 0)
      cout << "first";
    else if (t > 0)
      cout << "second";
    else {
      if (rec == 1)
        cout << "first";
      else
        cout << "second";
    }
  }
  return 0;
}
