#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long MOD = 1000000007;
const long long inf = 1e18;
const long long MOD_1 = 998244353;
inline long long gcd(long long a, long long b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
inline void take_input(long long A[], long long n) {
  for (long long i = 0; i < n; i++) {
    cin >> A[i];
  }
}
inline void show(long long A[], long long n) {
  for (long long i = 0; i < n; i++) {
    cout << A[i] << " ";
  }
  cout << '\n';
}
inline void show_vect(vector<long long> v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << '\n';
}
inline long long countDivisibles(long long a, long long b, long long c) {
  if (a % c == 0) {
    return (a % c + b % c + 1);
  }
  return (a % c + b % c);
}
inline bool sortbysec(const pair<long long, long long> &a,
                      const pair<long long, long long> &b) {
  return (a.second < b.second);
}
inline bool sortbysecdesc(const pair<long long, long long> &a,
                          const pair<long long, long long> &b) {
  return (a.second > b.second);
}
inline void swap(long long &a, long long &b) {
  long long temp = a;
  a = b;
  b = temp;
}
inline void initialise(long long A[], long long n, long long k) {
  for (long long i = 0; i < n; i++) {
    A[i] = k;
  }
}
inline void vect_input(vector<long long> &v, long long n) {
  for (long long i = 0; i < n; i++) {
    long long input;
    cin >> input;
    v.push_back(input);
  }
}
inline long long modulo(long long a, long long b) { return (b + (a % b)) % b; }
void p_g_t() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int32_t main() {
  p_g_t();
  long long n;
  cin >> n;
  vector<long long> first;
  vector<long long> second;
  string last;
  long long sum_first = 0, sum_second = 0;
  for (long long i = 0; i < n; i++) {
    long long input;
    cin >> input;
    if (input < 0) {
      second.push_back(abs(input));
      sum_second += abs(input);
      last = "second";
    } else {
      first.push_back(abs(input));
      sum_first += abs(input);
      last = "first";
    }
  }
  if (sum_first > sum_second) {
    cout << "first";
  } else if (sum_second > sum_first) {
    cout << "second";
  } else {
    long long ans = -1;
    for (long long i = 0; i < min(first.size(), second.size()); i++) {
      if (first[i] > second[i]) {
        ans = 1;
        break;
      } else if (first[i] < second[i]) {
        ans = 2;
        break;
      }
    }
    if (ans == 1)
      cout << "first";
    else if (ans == 2)
      cout << "second";
    else if (ans == -1) {
      cout << last;
    }
  }
  return 0;
}
