#include <bits/stdc++.h>
using namespace std;
template <class T>
T sqr(T x) {
  return x * x;
}
inline int getBit(long long x, int pos) { return ((x >> pos) & 1); }
const double EPS = 1e-9;
const double PI = acos(-1.0);
int n;
long long sm1, sm2;
vector<int> v1, v2;
int lst;
int main() {
  scanf("%d", &n);
  while (n-- > 0) {
    int x;
    scanf("%d", &x);
    lst = x;
    if (x > 0) {
      sm1 += x;
      v1.push_back(x);
    } else {
      x = -x;
      sm2 += x;
      v2.push_back(x);
    }
  }
  if (sm1 != sm2) {
    puts(sm1 > sm2 ? "first" : "second");
  } else {
    int id = 0;
    while (id < ((int)(v1).size()) && id < ((int)(v2).size()) &&
           v1[id] == v2[id])
      id++;
    if (id < ((int)(v1).size()) && id < ((int)(v2).size())) {
      puts(v1[id] > v2[id] ? "first" : "second");
    } else {
      if (id < ((int)(v1).size())) {
        puts("first");
      } else if (id < ((int)(v2).size())) {
        puts("second");
      } else {
        puts(lst > 0 ? "first" : "second");
      }
    }
  }
  return 0;
}
