#include <bits/stdc++.h>
using namespace std;
long long n, t, c, s[2];
list<long long> a[2];
int main() {
  cin >> n;
  while (n--) {
    scanf("%I64d", &c);
    t = c < 0;
    a[t].push_back(abs(c));
    s[t] += abs(c);
  }
  a[0].push_front(s[0]);
  a[1].push_front(s[1]);
  a[t].push_back(1);
  if (a[0] > a[1])
    cout << "first";
  else
    cout << "second";
}
