#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, flag;
  vector<int> a1, b1;
  cin >> n;
  long long fct = 0, sct = 0;
  for (long long i(0); i < n; i++) {
    cin >> a;
    b = a;
    if (a > 0) {
      fct += a;
      a1.push_back(a);
    } else {
      a *= -1;
      sct += a;
      b1.push_back(a);
    }
  }
  if (fct > sct) {
    flag = 1;
  } else if (sct > fct) {
    flag = 2;
  } else if (fct == sct) {
    int ismatch;
    int k = min(a1.size(), b1.size());
    for (int i(0); i < k; i++) {
      if (i == k - 1 && a1[i] == b1[i]) {
        if (a1.size() > b1.size())
          flag = 1;
        else if (a1.size() < b1.size())
          flag = 2;
        else {
          if (b > 0)
            flag = 1;
          else
            flag = 2;
        }
      }
      if (a1[i] > b1[i]) {
        flag = 1;
        break;
      } else if (a1[i] < b1[i]) {
        flag = 2;
        break;
      }
    }
  }
  if (flag == 1)
    cout << "first";
  else
    cout << "second";
}
