#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1;
int n, first, a[N];
long long s1, s2;
vector<int> v1, v2;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> first;
    a[i] = first;
    if (first > 0)
      s1 += first, v1.push_back(first);
    else
      s2 += -first, v2.push_back(-first);
  }
  if (s1 > s2)
    cout << "first";
  else if (s1 < s2)
    cout << "second";
  else {
    v1.resize(max(v1.size(), v2.size()));
    for (int i = 0; i < v1.size(); i++)
      if (v1[i] > v2[i])
        return cout << "first", 0;
      else if (v1[i] < v2[i])
        return cout << "second", 0;
    if (a[n - 1] > 0)
      cout << "first";
    else
      cout << "second";
  }
}
