#include <bits/stdc++.h>
long long n, c1, c2;
std::vector<int> s1, s2;
bool judge() {
  std::ios::sync_with_stdio(0);
  std::cin >> n;
  c1 = c2 = 0LL;
  int tee;
  for (int i = (0), __ = (n); i < __; ++i) {
    std::cin >> n;
    if (n > 0) {
      s1.push_back(n);
      c1 += n;
    } else {
      s2.push_back(-n);
      c2 -= n;
    }
  }
  if (c1 != c2) return c1 > c2;
  if (s1 == s2) return n > 0;
  return lexicographical_compare(s2.begin(), s2.end(), s1.begin(), s1.end())
             ? 1
             : 0;
}
int main() {
  if (judge()) {
    std::cout << "first\n";
  } else
    std::cout << "second\n";
  return 0;
}
