#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v1, v2;
  int n;
  cin >> n;
  int a[n], i;
  unsigned long long first = 0, second = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", a + i);
    if (a[i] > 0) {
      first += a[i];
      v1.push_back(a[i]);
    } else {
      v2.push_back(-1 * a[i]);
      second += *(v2.rbegin());
    }
  }
  if (second > first)
    cout << "second";
  else if (first > second)
    cout << "first";
  else {
    for (i = 0; i < v1.size() && i < v2.size(); i++) {
      if (v1[i] > v2[i]) {
        cout << "first";
        break;
      } else if (v1[i] < v2[i]) {
        cout << "second";
        break;
      }
    }
    if (i == v1.size() && i == v2.size()) {
      if (a[n - 1] > 0)
        cout << "first";
      else
        cout << "second";
    } else if (i == v1.size())
      cout << "second";
    else if (i == v2.size())
      cout << "first";
  }
  return 0;
}
