#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int a[n], sum = 0;
  vector<int> v;
  vector<int> u;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    if (a[i] > 0)
      u.push_back(a[i]);
    else
      v.push_back(0 - a[i]);
  }
  if (sum > 0)
    cout << "first";
  else if (sum < 0)
    cout << "second";
  else {
    int f = 0, m = u.size();
    if (m > v.size()) m = v.size();
    for (int i = 0; i < m; i++) {
      if (v[i] < u[i]) {
        f = 1;
        break;
      } else if (v[i] > u[i]) {
        f = 2;
        break;
      }
    }
    if (!f) {
      if (u.size() > v.size())
        f = 1;
      else if (u.size() < v.size())
        f = 2;
      else {
        if (a[n - 1] > 0)
          f = 1;
        else
          f = 2;
      }
    }
    if (f == 1)
      cout << "first";
    else
      cout << "second";
  }
}
