#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v1;
  vector<int> v2;
  long long int p1 = 0, p2 = 0;
  int n, ans, num;
  scanf("%d", &(n));
  for (int i = 0; i < n; i++) {
    scanf("%d", &(num));
    if (num > 0) {
      v1.push_back(num);
      p1 += num;
    } else {
      v2.push_back(num * -1);
      p2 += (num * -1);
    }
  }
  if (p1 > p2)
    ans = 1;
  else if (p2 > p1)
    ans = 2;
  else {
    int mn = min(v1.size(), v2.size());
    int flag = 0;
    for (int i = 0; i < mn; i++) {
      if (v1[i] != v2[i]) {
        flag = 1;
        if (v1 > v2)
          ans = 1;
        else
          ans = 2;
        break;
      }
    }
    if (flag == 0) {
      if (num < 0)
        ans = 2;
      else
        ans = 1;
    }
  }
  if (ans == 1)
    printf("first\n");
  else
    printf("second\n");
  return 0;
}
