#include <bits/stdc++.h>
using namespace std;
vector<int> p, q;
long long int x, y;
int last;
void makeValue() {
  int m, n;
  m = 0;
  n = 0;
  while (m < p.size() && n < q.size()) {
    if (p[m] < q[n]) {
      cout << "second\n";
      return;
    } else if (p[m] > q[n]) {
      cout << "first\n";
      return;
    }
    m++;
    n++;
  }
  if (m < p.size())
    cout << "first\n";
  else if (n < q.size())
    cout << "second\n";
  else {
    if (last == 0) {
      cout << "first\n";
    } else
      cout << "second\n";
  }
  return;
}
void process(int a) {
  if (a < 0) {
    y += (-a);
    q.push_back(-a);
    last = 1;
  } else {
    x += a;
    p.push_back(a);
    last = 0;
  }
}
int main() {
  int n;
  cin >> n;
  while (n--) {
    int a;
    cin >> a;
    process(a);
  }
  if (x > y)
    cout << "first";
  else if (x < y)
    cout << "second";
  else
    makeValue();
}
