#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a;
  int t1 = 0;
  int t2 = 0;
  long long int s1 = 0;
  long long int s2 = 0;
  int d1[200010];
  int d2[200010];
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a > 0) {
      d1[t1] = a;
      s1 += a;
      t1++;
    } else {
      d2[t2] = -a;
      s2 += -a;
      t2++;
    }
  }
  if (s1 > s2) {
    cout << "first";
  }
  if (s1 < s2) {
    cout << "second";
  }
  if (s1 == s2) {
    int en = min(t1, t2);
    int flag = 0;
    for (int i = 0; i < en; i++) {
      if (d1[i] != d2[i]) {
        if (d1[i] > d2[i]) {
          cout << "first";
        } else {
          cout << "second";
        }
        flag = 1;
        break;
      }
    }
    if (!flag) {
      if (t1 != t2) {
        if (t1 > t2)
          cout << "first";
        else
          cout << "second";
      } else if (a > 0)
        cout << "first";
      else
        cout << "second";
    }
  }
}
