#include <bits/stdc++.h>
using namespace std;
int jai_shree_ram() { return 1; }
int shree_ganeshay_namah() { return 1; }
long long int power(long long int x, long long int y) {
  long long int r = 1;
  while (y > 0) {
    if (y % 2 != 0) r = r * x;
    x = x * x;
    y = y / 2;
  }
  return r;
}
long long int ncr(long long int n, long long int k) {
  long long int c[k + 1];
  memset(c, 0, sizeof(c));
  c[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = min(i, k); j > 0; j--) c[j] = c[j] + c[j - 1];
  }
  return c[k];
}
bool prime[500001];
void sieve() {
  long long int i, j;
  memset(prime, true, sizeof(prime));
  prime[0] = false;
  prime[1] = false;
  for (i = 2; i <= sqrt(100001); i++) {
    if (prime[i]) {
      for (j = i * i; j <= 100001; j = j + i) prime[j] = false;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, a = 0, b = 0, i, j;
  vector<long long int> v1;
  vector<long long int> v2;
  cin >> n;
  long long int c;
  for (i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    if (x > 0) {
      a = a + x;
      v1.push_back(x);
      c = 1;
    } else {
      b = b - x;
      v2.push_back(-x);
      c = -1;
    }
  }
  if (a > b) {
    cout << "first";
    return 0;
  }
  if (a < b) {
    cout << "second";
    return 0;
  }
  for (i = 0; i < min(v1.size(), v2.size()); i++) {
    if (v1[i] < v2[i]) {
      cout << "second";
      return 0;
    }
    if (v1[i] > v2[i]) {
      cout << "first";
      return 0;
    }
  }
  if (v1.size() < v2.size()) {
    cout << "second";
    return 0;
  }
  if (v1.size() > v2.size()) {
    cout << "first";
    return 0;
  }
  if (c == 1)
    cout << "first";
  else
    cout << "second";
  return 0;
}
