Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
B. Vasya and Wrestling

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputVasya has become interested in wrestling. In wrestling wrestlers use techniques for which they are awarded points by judges. The wrestler who gets the most points wins.

When the numbers of points of both wrestlers are equal, the wrestler whose sequence of points is lexicographically greater, wins.

If the sequences of the awarded points coincide, the wrestler who performed the last technique wins. Your task is to determine which wrestler won.

Input

The first line contains number *n* — the number of techniques that the wrestlers have used (1 ≤ *n* ≤ 2·10^{5}).

The following *n* lines contain integer numbers *a*_{i} (|*a*_{i}| ≤ 10^{9}, *a*_{i} ≠ 0). If *a*_{i} is positive, that means that the first wrestler performed the technique that was awarded with *a*_{i} points. And if *a*_{i} is negative, that means that the second wrestler performed the technique that was awarded with ( - *a*_{i}) points.

The techniques are given in chronological order.

Output

If the first wrestler wins, print string "first", otherwise print "second"

Examples

Input

5

1

2

-3

-4

3

Output

second

Input

3

-1

-2

3

Output

first

Input

2

4

-4

Output

second

Note

Sequence *x* = *x*_{1}*x*_{2}... *x*_{|x|} is lexicographically larger than sequence *y* = *y*_{1}*y*_{2}... *y*_{|y|}, if either |*x*| > |*y*| and *x*_{1} = *y*_{1}, *x*_{2} = *y*_{2}, ... , *x*_{|y|} = *y*_{|y|}, or there is such number *r* (*r* < |*x*|, *r* < |*y*|), that *x*_{1} = *y*_{1}, *x*_{2} = *y*_{2}, ... , *x*_{r} = *y*_{r} and *x*_{r + 1} > *y*_{r + 1}.

We use notation |*a*| to denote length of sequence *a*.

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: May/08/2021 06:35:46 (h2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|