#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n;
  cin >> n;
  long long int arr[n], first = 0, second = 0, cnt = 0, index;
  vector<long long int> a, b;
  for (long int r = 0; r < n; r++) {
    cin >> arr[r];
    if (arr[r] > 0) {
      first += arr[r];
    } else {
      second += abs(arr[r]);
    }
  }
  if (first > second) {
    cout << "first";
    return 0;
  } else if (second > first) {
    cout << "second";
    return 0;
  }
  for (long int r = 0; r < n; r++) {
    if (arr[r] > 0) {
      a.push_back(arr[r]);
    } else {
      b.push_back(abs(arr[r]));
    }
  }
  if (a.size() != b.size()) {
    for (long int r = 0; r < min(a.size(), b.size()); r++) {
      if (a[r] == b[r]) {
        cnt++;
      } else {
        index = r;
        break;
      }
    }
    if (cnt == min(a.size(), b.size())) {
      if (cnt == a.size()) {
        cout << "second";
        return 0;
      } else {
        cout << "first";
        return 0;
      }
    } else {
      if (a[index] > b[index]) {
        cout << "first";
        return 0;
      } else {
        cout << "second";
        return 0;
      }
    }
  } else {
    for (long int r = 0; r < a.size(); r++) {
      if (a[r] == b[r]) {
        cnt++;
      } else {
        index = r;
        break;
      }
    }
    if (cnt != a.size()) {
      if (a[index] > b[index]) {
        cout << "first";
        return 0;
      } else if (a[index] < b[index]) {
        cout << "second";
        return 0;
      }
    }
  }
  if (arr[n - 1] < 0) {
    cout << "second";
  } else {
    cout << "first";
  }
  return 0;
}
