#include <bits/stdc++.h>
using namespace std;
string toString(int n) {
  ostringstream s;
  s << n;
  return s.str();
}
int fc = 0;
int lc = 0;
int larger(long long s[], long long t[]) {
  if (fc > 0 && lc == 0) {
    return 1;
  } else if (fc == 0 && lc > 0) {
    return 2;
  } else if (fc == 0 && lc == 0) {
    return 0;
  }
  if (fc > lc) {
    bool b = true;
    for (int i = 0; i < lc; i++) {
      if (t[i] != s[i]) {
        b = false;
        break;
      }
    }
    if (b) return 1;
  } else if (fc < lc) {
    bool b = true;
    for (int i = 0; i < fc; i++) {
      if (t[i] != s[i]) {
        b = false;
        break;
      }
    }
    if (b) return 2;
  }
  if (fc <= lc) {
    for (int i = 0; i < fc; i++) {
      if (t[i] != s[i]) {
        if (t[i] > s[i]) {
          return 2;
        } else if (t[i] < s[i]) {
          return 1;
        } else {
          return 0;
        }
      }
    }
  } else {
    for (int i = 0; i < lc; i++) {
      if (t[i] != s[i]) {
        if (t[i] > s[i]) {
          return 2;
        } else if (t[i] < s[i]) {
          return 1;
        } else {
          return 0;
        }
      }
    }
  }
  return 0;
}
int main() {
  int n;
  long long f[200000];
  long long l[200000];
  long long x;
  long long last = 0;
  cin >> n;
  long long fp = 0;
  long long lp = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x < 0) {
      x = abs(x);
      last = 2;
      l[lc] = x;
      lc++;
      lp += x;
    } else {
      f[fc] = x;
      fc++;
      last = 1;
      fp += x;
    }
  }
  if (fp > lp) {
    cout << "first" << endl;
  } else if (lp > fp) {
    cout << "second" << endl;
  } else {
    if (larger(f, l) == 1) {
      cout << "first" << endl;
    } else if (larger(f, l) == 2) {
      cout << "second" << endl;
    } else {
      if (last == 1) {
        cout << "first" << endl;
      } else {
        cout << "second" << endl;
      }
    }
  }
}
