#include <bits/stdc++.h>
using namespace std;
const int MAX_INT = INT32_MAX;
const long long MAX_LL = INT64_MAX;
const long long mod = 1e9 + 7;
const int N = 1;
bool primes[N + 1];
int npr(int n, int r) {
  int res = 1;
  for (auto i = n - r + 1; i <= n; i++) res *= i;
  return res;
}
int ncr(int n, int r) {
  int res = 1;
  int rFact = 1;
  for (auto i = n - r + 1; i <= n; i++) {
    res *= i;
    if (res % rFact == 0 && rFact <= r) res /= rFact, rFact++;
  }
  return res;
}
void sieve() {
  memset(primes, true, sizeof(primes));
  primes[0] = primes[1] = false;
  for (int i = 2; i * i <= N; i++) {
    if (primes[i]) {
      for (int j = i * i; j <= N; j += i) primes[j] = false;
    }
  }
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n == 2) return true;
  for (auto i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return false;
  return true;
}
set<long long> getDivisors(long long val) {
  set<long long> st;
  for (auto i = 1; i <= sqrt(val); i++)
    if (val % i == 0) st.insert(i), st.insert(val / i);
  return st;
}
long long fastPow(long long base, long long power) {
  long long res = 1;
  while (power > 0) {
    if (power % 2 != 0) res = (res * base) % mod;
    base = (base * base) % mod;
    power /= 2;
  }
  return res;
}
bool palindrome(string s) {
  string reversedS = s;
  reverse(reversedS.begin(), reversedS.end());
  if (s == reversedS)
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<long long> v(n), A, B;
  int winner = -1;
  long long mxA = -1, mxB = -1;
  bool lexi = false;
  long long sum = 0;
  for (auto i = 0; i < n; i++) {
    cin >> v[i];
    sum += v[i];
    if (v[i] > 0)
      A.push_back(v[i]);
    else
      B.push_back(abs(v[i]));
  }
  for (auto i = 0; i < min(A.size(), B.size()); i++) {
    if (A[i] > B[i]) {
      lexi = true;
      winner = 0;
      break;
    } else if (B[i] > A[i]) {
      lexi = true;
      winner = 1;
      break;
    }
  }
  if (sum == 0) {
    if (lexi)
      cout << ((winner == 0) ? "first" : "second");
    else
      cout << ((v.back() > 0) ? "first" : "second");
  } else
    cout << ((sum > 0) ? "first" : "second");
  cout << endl;
  return 0;
}
