#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int z, k = 0, kk = 0, a[200010], b[200010], count = 0, sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> z;
    if (z > 0) {
      a[k++] = z;
      sum += z;
    } else {
      b[kk++] = -1 * z;
      count += -1 * z;
    }
  }
  int c;
  if (z > 0)
    c = 1;
  else
    c = 0;
  int g = 2;
  if (sum > count) {
    cout << "first" << endl;
  } else if (count > sum)
    cout << "second" << endl;
  else {
    if (k < kk) {
      g = 0;
      for (int i = 0; i < k; i++) {
        if (a[i] > b[i]) {
          g = 1;
          break;
        } else if (b[i] > a[i]) {
          g = 0;
          break;
        }
      }
      if (g == 1)
        cout << "first" << endl;
      else
        cout << "second" << endl;
    } else if (k > kk) {
      g = 1;
      for (int i = 0; i < kk; i++) {
        if (a[i] > b[i]) {
          g = 1;
          break;
        } else if (b[i] > a[i]) {
          g = 0;
          break;
        }
      }
      if (g == 1)
        cout << "first" << endl;
      else
        cout << "second" << endl;
    } else {
      for (int i = 0; i < kk; i++) {
        if (a[i] > b[i]) {
          g = 1;
          break;
        } else if (b[i] > a[i]) {
          g = 0;
          break;
        }
      }
      if (g == 2) {
        if (c == 1)
          cout << "first" << endl;
        else
          cout << "second" << endl;
      } else {
        if (g == 1)
          cout << "first" << endl;
        else
          cout << "second" << endl;
      }
    }
  }
  return 0;
}
