#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 9;
const int mod = 1e9 + 7;
long long n, x, t, l, p1, p2;
vector<long long> v1, v2;
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> x;
    if (x < 0)
      l = 2, p2 += x, v1.push_back(abs(x));
    else
      l = 1, p1 += x, v2.push_back(x);
  }
  p1 = abs(p1);
  p2 = abs(p2);
  if (p1 > p2) return cout << "first", 0;
  if (p1 < p2) return cout << "second", 0;
  for (int i = 0; i < v1.size(); i++) {
    if (i < v2.size()) {
      if (v1[i] > v2[i]) {
        return cout << "second", 0;
      } else if (v1[i] < v2[i]) {
        return cout << "first", 0;
      }
    }
  }
  if (v1 == v2) {
    if (l == 2)
      cout << "second";
    else
      cout << "first";
    return 0;
  }
  if (v1.size() < v2.size())
    cout << "first";
  else
    cout << "second";
  return 0;
}
