#include <bits/stdc++.h>
using namespace std;
vector<long long> v1, v2;
bool cmp(const long long a, const long long b) { return a > b; }
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    bool last;
    long long tmp, sum1 = 0, sum2 = 0;
    v1.clear(), v2.clear();
    for (int i = 0; i < n; i++) {
      scanf("%I64d", &tmp);
      if (tmp > 0) {
        sum1 += tmp;
        v1.push_back(tmp);
        if (i == n - 1) last = true;
      } else {
        tmp = -tmp;
        sum2 += tmp;
        v2.push_back(tmp);
        if (i == n - 1) last = false;
      }
    }
    if (sum1 != sum2) {
      if (sum1 > sum2)
        printf("first\n");
      else
        printf("second\n");
    } else {
      bool judge = false;
      int win = 0;
      for (int i = 0; i < min(v1.size(), v2.size()); i++) {
        if (v1[i] > v2[i]) {
          win = 1;
          judge = true;
          break;
        } else if (v1[i] < v2[i]) {
          win = 2;
          judge = true;
          break;
        }
      }
      if (judge) {
        if (win == 1)
          printf("first\n");
        else
          printf("second\n");
      } else {
        if (v1.size() == v2.size()) {
          if (last)
            printf("first\n");
          else
            printf("second\n");
        } else {
          if (v1.size() > v2.size())
            printf("first\n");
          else
            printf("second\n");
        }
      }
    }
  }
  return 0;
}
