#include <bits/stdc++.h>
int numOfTech, curVal;
int output, lastTech;
int wrestler1[200000], wrestler2[200000];
int w1Count = 0, w2Count = 0;
int flag = 0;
long long sum1 = 0, sum2 = 0;
void takeInput();
void solveIt();
void showOutput(int output);
void lexicoCheck();
int main() {
  takeInput();
  solveIt();
  return 0;
}
void takeInput() {
  scanf("%d", &numOfTech);
  for (int i = 0; i < numOfTech; i++) {
    scanf("%d", &curVal);
    if (curVal > 0) {
      wrestler1[w1Count] = curVal;
      sum1 += curVal;
      w1Count++;
    } else {
      wrestler2[w2Count] = curVal;
      sum2 += abs(curVal);
      w2Count++;
    }
    if (i == numOfTech - 1) {
      lastTech = curVal;
    }
  }
}
void solveIt() {
  if (sum1 > sum2) {
    output = 1;
  } else if (sum2 > sum1) {
    output = 2;
  } else {
    output = 3;
  }
  showOutput(output);
}
void showOutput(int output) {
  switch (output) {
    case 1:
      printf("first");
      break;
    case 2:
      printf("second");
      break;
    case 3:
      lexicoCheck();
      break;
  }
}
void lexicoCheck() {
  if (w1Count < w2Count) {
    int i = 0;
    for (i = 0; i < w1Count; i++) {
      if (wrestler1[i] > abs(wrestler2[i])) {
        flag = 1;
        showOutput(1);
        break;
      } else if (abs(wrestler2[i]) > wrestler1[i]) {
        flag = 1;
        showOutput(2);
        break;
      }
    }
    if (flag == 0) {
      if (lastTech > 0) {
        showOutput(1);
      } else {
        showOutput(2);
      }
    }
  } else {
    int i = 0;
    for (i = 0; i < w2Count; i++) {
      if (wrestler1[i] > abs(wrestler2[i])) {
        flag = 1;
        showOutput(1);
        break;
      } else if (abs(wrestler2[i]) > wrestler1[i]) {
        flag = 1;
        showOutput(2);
        break;
      }
    }
    if (flag == 0) {
      if (lastTech > 0) {
        showOutput(1);
      } else {
        showOutput(2);
      }
    }
  }
}
