#include <bits/stdc++.h>
using namespace std;
int n, x, lex;
long long suma, sumb;
bool kq, cuoi;
vector<int> sa, sb;
int main() {
  cin >> n;
  suma = sumb = 0;
  sa.clear();
  sb.clear();
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (x > 0) {
      suma += x;
      sa.push_back(x);
    } else {
      sumb -= x;
      sb.push_back(-x);
    }
  }
  cuoi = (x > 0);
  if (suma == sumb) {
    lex = 0;
    while (sa.size() < sb.size()) sa.push_back(0);
    while (sb.size() < sa.size()) sb.push_back(0);
    for (int i = 0; i < sa.size(); i++) {
      if (sa[i] > sb[i]) {
        lex = 1;
        break;
      }
      if (sa[i] < sb[i]) {
        lex = -1;
        break;
      }
    }
    if (lex == 0)
      kq = cuoi;
    else
      kq = (lex > 0);
  } else {
    kq = (suma > sumb);
  }
  if (kq)
    cout << "first";
  else
    cout << "second";
}
