#include <bits/stdc++.h>
using namespace std;
int n, a, pos1, pos2;
long long ans;
int frs[200001], scnd[200001];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  pos1 = pos2 = 0;
  for (int i = (0); i < (n); ++i) {
    cin >> a;
    ans += a;
    if (a < 0)
      scnd[pos2++] = -a;
    else
      frs[pos1++] = a;
  }
  if (ans != 0)
    cout << (ans > 0 ? "first" : "second");
  else {
    for (int i = 0; i < pos1 && i < pos2; ++i) {
      if (frs[i] != scnd[i]) {
        cout << (frs[i] > scnd[i] ? "first" : "second");
        return 0;
      }
    }
    if (pos1 != pos2)
      cout << (pos1 > pos2 ? "first" : "second");
    else
      cout << (a > 0 ? "first" : "second");
  }
  return 0;
}
