#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    vector<long long int> brr;
    vector<long long int> crr;
    long long int arr[n];
    long long int suma = 0, sumb = 0;
    for (int i = 0; i < n; i++) {
      int aa;
      cin >> aa;
      arr[i] = aa;
      if (aa >= 0) {
        brr.push_back(aa);
        suma += aa;
      } else {
        crr.push_back(-aa);
        sumb -= aa;
      }
    }
    if (suma > sumb)
      cout << "first\n";
    else if (sumb > suma)
      cout << "second\n";
    else {
      bool bo = true;
      for (int i = 0; i < std::min(brr.size(), crr.size()); i++) {
        if (brr[i] > crr[i]) {
          cout << "first\n";
          bo = false;
          break;
        } else if (brr[i] < crr[i]) {
          cout << "second\n";
          bo = false;
          break;
        }
      }
      if (bo) {
        if (brr.size() > crr.size()) {
          bo = false;
          cout << "first\n";
        } else if (crr.size() > brr.size()) {
          bo = false;
          cout << "second\n";
        }
      }
      if (bo) {
        if (arr[n - 1] < 0)
          cout << "second\n";
        else
          cout << "first\n";
      }
    }
  }
}
