#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int a, sa = 0, sb = 0;
  vector<long long int> fi, se;
  bool last;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a > 0) {
      fi.push_back(a);
      sa += a;
      last = true;
    } else {
      se.push_back(-a);
      sb += -a;
      last = false;
    }
  }
  string res;
  bool f = true;
  if (sa != sb) {
    res = (sa > sb ? "first" : "second");
  } else {
    for (int i = 0; i < min(fi.size(), se.size()); i++) {
      if (fi[i] != se[i]) {
        f = false;
        if (fi[i] > se[i])
          res = "first";
        else
          res = "second";
        break;
      }
    }
    if (f) {
      if (fi.size() > se.size())
        res = "first";
      else if (fi.size() < se.size())
        res = "second";
      else if (last)
        res = "first";
      else
        res = "second";
    }
  }
  cout << res << "\n";
  return 0;
}
