#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
inline bool sc(int &_x) { return scanf("%d", &_x) == 1; }
inline bool sc(int &_x, int &_y) { return sc(_x) && sc(_y); }
inline bool sc(int &_x, int &_y, int &_z) { return sc(_x) && sc(_y) && sc(_z); }
inline bool sc(int &_x, int &_y, int &_z, int &_zz) {
  return sc(_x) && sc(_y) && sc(_z) && sc(_zz);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  vector<int> a, b;
  long long sa = 0, sb = 0;
  int n, x;
  cin >> n;
  for (int i = (0); i < (n); i++) {
    cin >> x;
    if (x > 0)
      a.push_back(x), sa += x;
    else
      b.push_back(-x), sb -= x;
  }
  if (sa > sb)
    cout << "first";
  else if (sb > sa)
    cout << "second";
  else {
    int f = 0;
    for (int i = (0); i < (min(a.size(), b.size())); i++) {
      if (a[i] > b[i]) {
        f = 1;
        break;
      } else if (a[i] < b[i]) {
        f = 2;
        break;
      }
    }
    if (f == 1)
      cout << "first";
    else if (f == 2)
      cout << "second";
    else {
      if (a.size() > b.size())
        cout << "first";
      else if (a.size() < b.size())
        cout << "second";
      else {
        if (x > 0)
          cout << "first";
        else
          cout << "second";
      }
    }
  }
}
