#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6;
void rev(int st, int ed, vector<int>& a) {
  int i, j = ed;
  for (i = st; i < j; i++, j--) {
    int t = a[i];
    a[i] = a[j];
    a[j] = t;
  }
}
int find(vector<int> a, vector<int> b, vector<int> c, vector<int> d, int t) {
  int i, j, n = a.size(), m = c.size();
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if ((c[j] + t <= b[i] && d[j] + t >= b[i]) ||
          (c[j] + t <= a[i] && d[j] + t >= a[i]) ||
          (c[j] + t >= a[i] && d[j] + t <= b[i])) {
        return 1;
      }
    }
  }
  return 0;
}
int main() {
  int n, i;
  cin >> n;
  long long int last;
  vector<long long int> a, b;
  long long int s = 0LL;
  for (i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    if (x > 0) {
      a.push_back(x);
      s += x;
    } else {
      b.push_back(-x);
      s += x;
    }
    last = x;
  }
  if (s > 0) {
    cout << "first";
  } else if (s < 0) {
    cout << "second";
  } else {
    int flag = 0, i = 0, j = 0, n = a.size(), m = b.size();
    while (i < n && j < m && flag == 0) {
      if (a[i] < b[i]) {
        flag = 1;
      } else if (a[i] > b[i]) {
        flag = -1;
      } else {
        i++;
        j++;
      }
    }
    if (flag == 1) {
      cout << "second";
    } else if (flag == -1) {
      cout << "first";
    } else {
      if (last > 0) {
        cout << "first";
      } else {
        cout << "second";
      }
    }
  }
  return 0;
}
