#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int DX[] = {1, 0, -1, 0}, DY[] = {0, 1, 0, -1};
long long int C(int n, int k) {
  long long ans = 1;
  k = k > n - k ? n - k : k;
  int j = 1;
  for (; j <= k; j++, n--) {
    if (n % j == 0) {
      ans *= n / j;
    } else if (ans % j == 0) {
      ans = ans / j * n;
    } else {
      ans = (ans * n) / j;
    }
  }
  return ans;
}
long long int powmod(long long int a, long long int b) {
  long long int res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0)
    return (b);
  else
    return (gcd(b % a, a));
}
long long int powmod(long long int a, long long int b, long long int m) {
  long long int res = 1;
  a %= m;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<long long int> w1;
  vector<long long int> w2;
  long long int s1 = 0, s2 = 0;
  int last = 0;
  vector<string> a;
  a.push_back("first");
  a.push_back("second");
  for (int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    if (x >= 0) {
      w1.push_back(x);
      s1 += x;
      last = 0;
    } else {
      w2.push_back(-x);
      s2 += -x;
      last = 1;
    }
  }
  if (s1 > s2)
    cout << "first" << endl;
  else if (s1 < s2)
    cout << "second" << endl;
  else if (s2 == s1) {
    int flag = 0;
    int indi = 1;
    for (int i = 0; i < min(w1.size(), w2.size()); i++) {
      if (w1[i] > w2[i]) {
        indi = 0;
        flag = 1;
        break;
      } else if (w2[i] > w1[i]) {
        flag = 1;
        indi = 1;
        break;
      }
    }
    if (flag)
      cout << a[indi] << endl;
    else {
      if (w1.size() > w2.size())
        indi = 0;
      else if (w1.size() == w2.size())
        indi = last;
      cout << a[indi] << endl;
    }
  }
  return 0;
}
