#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  bool m = false;
  cin >> n;
  long long sum1 = 0, sum2 = 0;
  vector<int> v1, v2;
  int t;
  while (n) {
    cin >> t;
    if (t > 0) {
      sum1 += t;
      v1.push_back(t);
    } else {
      int zz = -1 * t;
      sum2 += zz;
      v2.push_back(zz);
    }
    if (n == 1) {
      if (t < 0) {
        m = false;
      } else {
        m = true;
      }
    }
    --n;
  }
  if (sum1 > sum2) {
    cout << "first";
  } else if (sum2 > sum1) {
    cout << "second";
  } else {
    int size1 = (int)v1.size();
    int size2 = (int)v2.size();
    if (size1 > size2) {
      int b = -1;
      for (int i = 0; i < size2; ++i) {
        if (v1[i] != v2[i]) {
          b = i;
          break;
        }
      }
      if (b == -1) {
        cout << "first";
        return;
      } else {
        if (v1[b] > v2[b]) {
          cout << "first";
        } else {
          cout << "second";
        }
        return;
      }
    } else if (size2 > size1) {
      int b = -1;
      for (int i = 0; i < size1; ++i) {
        if (v1[i] != v2[i]) {
          b = i;
          break;
        }
      }
      if (b == -1) {
        cout << "second";
        return;
      } else {
        if (v2[b] > v1[b]) {
          cout << "second";
        } else {
          cout << "first";
        }
        return;
      }
    } else {
      for (int i = 0; i < size1; ++i) {
        if (v1[i] > v2[i]) {
          cout << "first";
          return;
        } else if (v2[i] > v1[i]) {
          cout << "second";
          return;
        }
      }
      if (m) {
        cout << "first";
      } else {
        cout << "second";
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
  return 0;
}
