#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k, l = 0, m, n, p = 0, a, b, c, x, y, z;
  cin >> n;
  vector<long long int> v;
  vector<long long int> q;
  for (i = 0; i < n; i++) {
    cin >> m;
    if (m > 0) {
      if (i == n - 1) {
        z = m;
      }
      v.push_back(m);
      l = l + m;
    } else if (m < 0) {
      if (i == n - 1) {
        z = m;
      }
      q.push_back(abs(m));
      p = p + abs(m);
    }
  }
  if (l > p) {
    cout << "first";
  } else if (l < p) {
    cout << "second";
  } else if (l == p) {
    y = 0;
    a = min(v.size(), q.size());
    for (x = 0; x < a; x++) {
      if (v[x] > q[x]) {
        y = 1;
        cout << "first";
        break;
      } else if (v[x] < q[x]) {
        y = 1;
        cout << "second";
        break;
      }
    }
    if (y == 0) {
      if (z > 0) {
        cout << "first";
      } else {
        cout << "second";
      }
    }
  }
}
