#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,k,c=0,temp=0,l;
    set<char>s;
    pair<set<char>::iterator,bool>p;
    map<char,int>vec;
    map<char,int>::iterator it;
    cin>>n>>k;
    char re[n+1];
    for(int i=0;i<n;i++){
        cin>>re[i];
        p=s.insert(re[i]);
        if(p.second==1){
            vec.insert(make_pair(re[i],0));
        }
    }
    for(int i=0;i<n;i++){
            if(re[i]==re[i+1]){
                c++;
            }
            else c=0;
        if(k==1){
            if(c==1){
            vec[re[i]]+=1;
              c=0;
            }
            else vec[re[i]]+=1;
        }
        else{
             if(c==k-1){
            vec[re[i]]+=1;
              c=0;
              i++;
            }

            }
    }
   for(it=vec.begin();it!=vec.end();it++){
  // cout<<it->first<<" "<<it->second<<endl;
   if(it->second>temp){
    temp=it->second;
   }
  }
   cout<<temp<<endl;
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,k,c=0,temp=0;
    set<char>s;
    pair<set<char>::iterator,bool>p;
    map<char,int>vec;
    map<char,int>::iterator it;
    cin>>n>>k;
    char re[n+1];
    for(int i=0;i<n;i++){
        cin>>re[i];
        p=s.insert(re[i]);
        if(p.second==1){
            vec.insert(make_pair(re[i],0));
        }
    }
    if(s.size()==1){
        cout<<n/k;
        return 0;

    }
    if(n==2){
        cout<<1<<endl;
        return 0;
    }
    for(int i=0;i<n;i++){
        for(int j=i,m=0;m<k-1;m++,j++){
            if(re[j]==re[j+1]){
                c++;
            }
        }
     if(c==k-1){
                vec[re[i]]+=1;
            i=i+k-1;
            }
             c=0;
    }
   for(it=vec.begin();it!=vec.end();it++){
   if(it->second>temp){
    temp=it->second;
   }
   }
   cout<<temp<<endl;
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,k,c=0;
    set<char>s;
    pair<set<char>::iterator,bool>p;
    vector<pair<int,char>>vec;
    cin>>n>>k;
    char re[n+1];
    for(int i=0;i<n;i++){
        cin>>re[i];
        p=s.insert(re[i]);
        if(p.second==1){
            vec.push_back(make_pair(0,re[i]));
        }
    }
    if(s.size()==1){
        cout<<n/k;
        return 0;

    }
    if(n==2){
        cout<<1<<endl;
        return 0;
    }
    for(int i=0;i<n;i++){
        for(int j=i,m=0;m<k-1;m++,j++){
            if(re[j]==re[j+1]){
                c++;
            }
        }
     if(c==k-1){
                for(int l=0;l<vec.size();l++){
                    if(re[i]==vec[l].second){
                        vec[l].first++;
                        break;
                    }
                }
            i=i+k-1;
            }
             c=0;
    }
sort(vec.begin(),vec.end());
cout<<vec[vec.size()-1].first<<endl;
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,k,c=0;
    set<char>s;
    pair<set<char>::iterator,bool>p;
    vector<pair<int,char>>vec;
    cin>>n>>k;
    char re[n+1];
    for(int i=0;i<n;i++){
        cin>>re[i];
        p=s.insert(re[i]);
        if(p.second==1){
            vec.push_back(make_pair(0,re[i]));
        }
    }
    if(n==2){
        cout<<1<<endl;
        return 0;
    }
    for(int i=0;i<n;i++){
        for(int j=i,m=0;m<k-1;m++,j++){
            if(re[j]==re[j+1]){
                c++;
            }
        }
     if(c==k-1){
                for(int l=0;l<vec.size();l++){
                    if(re[i]==vec[l].second){
                        vec[l].first++;
                        break;
                    }
                }
            i=i+k-1;
            }
             c=0;
    }
sort(vec.begin(),vec.end());
cout<<vec[vec.size()-1].first<<endl;
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,k,c=0,temp=0;
    set<char>s;
    pair<set<char>::iterator,bool>p;
    map<char,int>vec;
    map<char,int>::iterator it;
    cin>>n>>k;
    char re[n+1];
    for(int i=0;i<n;i++){
        cin>>re[i];
        p=s.insert(re[i]);
        if(p.second==1){
            vec.insert(make_pair(re[i],0));
        }
    }
    if(k==1){
        cout<<n<<endl;
        return 0;
    }

    for(int i=0;i<n;i++){
            if(re[i]==re[i+1]){
                c++;
            }
            else c=0;
     if(c==k-1){
            vec[re[i]]+=1;
              c=0;
              i++;
            }
    }
   for(it=vec.begin();it!=vec.end();it++){
  // cout<<it->first<<" "<<it->second<<endl;
   if(it->second>temp){
    temp=it->second;
   }
  }
   cout<<temp<<endl;
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,k,c=0,temp=0;
    set<char>s;
    pair<set<char>::iterator,bool>p;
    map<char,int>vec;
    map<char,int>::iterator it;
    cin>>n>>k;
    char re[n+1];
    for(int i=0;i<n;i++){
        cin>>re[i];
        p=s.insert(re[i]);
        if(p.second==1){
            vec.insert(make_pair(re[i],0));
        }
    }
    for(int i=0;i<n;i++){
            if(re[i]==re[i+1]){
                c++;
            }
            else c=0;
     if(c==k-1){
            vec[re[i]]+=1;
              c=0;
              i++;
            }
    }
   for(it=vec.begin();it!=vec.end();it++){
  // cout<<it->first<<" "<<it->second<<endl;
   if(it->second>temp){
    temp=it->second;
   }
  }
   cout<<temp<<endl;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	ios::sync_with_stdio(false);
	int n,k,ans=0;
	string s;
	cin>>n>>k>>s;
	for(int i=0;i<26;i++)
	{
		int sum1=0,sum2=0;
		for(int j=0;j<n;j++)
		{
			if(s[j]==i+'a')
				sum2++;
			else
				sum2=0;
			if(sum2>=k)
			{
				sum2=0;
				sum1++;
			}
		}
		ans=max(ans,sum1);
	}
	cout<<ans<<endl;
	return 0;
}
//


#include<cstdio>
#include<algorithm>

int num[512];

int main()
{
    int n,m;scanf("%d%d",&n,&m);
    char temp = 0,ch;int cnt=0,max=0;getchar();

    if(m==1) while(n--) num[getchar()]++;

    else
        while(n--)
        {
            ch=getchar();
            if(ch==temp)
            {
                cnt++;if(cnt==m) num[temp]++,cnt=0,temp=0;
            }
            else cnt=1,temp=ch;
        }
    for(int i=0;i<256;i++) max=std::max(max,num[i]);
    printf("%d",max);
}


#include<bits/stdc++.h>
using namespace std;
string s;
int vis[1001],n,k,ans,S;
int main(){
	int i=0;
	scanf("%d%d",&n,&k);
	cin>>s;S=s.size();s+='#';
	while(1){
		if(i>=S)break;
		char s1=s[i];int j=i+1;
		while(s[j]==s1)j++;
		int len=j-i;
		if(len>=k){
			vis[s1-'a'+1]+=len/k;
		}
		i=j;
	}
	for(int i=1;i<=26;i++)ans=max(ans,vis[i]);
		cout<<ans;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxn=1e9;
int vis[100005];
int main(){
	int n,k,ans,flag,z;
	string s,c;
	while(cin>>n>>k){
		cin>>s;
		ans=0;
		for(int i=0;i<n;i++)	vis[i]=1;
		for(int i=0;i<n-k+1;i++){
			c="",flag=0;
			for(int j=0;j<k;j++){
				if(s[i]!=s[j+i]){
					flag=1;
					break;
				}
				c+=s[i];
			}
			if(flag==1)	continue;
			z=i+k;
			while(z<n-k+1){
				flag=0;
				for(int j=0;j<k;j++){
					if(s[j+z]!=c[j]){
						flag=1;
						break;
					}
				}
				if(flag==0)	vis[i]++;
				z++;
			}
//			cout<<c<<endl;
			ans=max(ans,vis[i]);
		}
		cout<<ans<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
inline int gi()
{
	char c; int x=0,f=1;
	for(;c<'0'||c>'9';c=getchar())if(c=='-')f=-1;
	for(;c>='0'&&c<='9';c=getchar())x=(x<<1)+(x<<3)+c-'0';
	return x*f;
}
const int N=200005;
char s[N]; int n, k;
int main()
{
#ifndef ONLINE_JUDGE
	freopen("b.in","r",stdin);
#endif
	scanf("%d%d%s",&n,&k,s+1);
	int ans=0;
	for(char c='a';c<='z';++c)
	{
		int tot=0;
		for(int i=1;i<=n;++i)
			if(s[i]==c)
			{
				int j;
				for(j=i+1;j<=n&&j-i+1<=k&&s[j]==c;++j);
				if(j-i+1==k+1) ++tot;
				i=j-1;
			}
		ans=max(ans,tot);
	}
	printf("%d",ans);
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <queue>
#include <cmath>
#include <stack>
#include <deque>
#include <map>
#include <set>

#define ll long long
#define inf 0x3f3f3f3f
#define il inline

namespace io {

    #define in(a) a=read()
    #define out(a) write(a)
    #define outn(a) out(a),putchar('\n')

    #define I_int ll
    inline I_int read() {
        I_int x = 0 , f = 1 ; char c = getchar() ;
        while( c < '0' || c > '9' ) { if( c == '-' ) f = -1 ; c = getchar() ; }
        while( c >= '0' && c <= '9' ) { x = x * 10 + c - '0' ; c = getchar() ; }
        return x * f ;
    }
    char F[ 200 ] ;
    inline void write( I_int x ) {
        if( x == 0 ) { putchar( '0' ) ; return ; }
        I_int tmp = x > 0 ? x : -x ;
        if( x < 0 ) putchar( '-' ) ;
        int cnt = 0 ;
        while( tmp > 0 ) {
            F[ cnt ++ ] = tmp % 10 + '0' ;
            tmp /= 10 ;
        }
        while( cnt > 0 ) putchar( F[ -- cnt ] ) ;
    }
    #undef I_int

}
using namespace io ;

using namespace std ;

#define N 500010

int cnt[26], n = read(), k = read(), ans[N];
char s[N];

int main() {
	scanf("%s", s + 1);
	for(int i = 1; i <= n; i++) {
		if(s[i] != s[i - 1] && i != 1) {
			for(int j = 0; j < 26; ++j) {
				if(cnt[j] >= k) {
					ans[j] += cnt[j] / k;
				}
			}
			memset(cnt, 0, sizeof(cnt));
		}
		cnt[s[i] - 'a']++;
	}
	for(int j = 0; j < 26; ++j) {
		if(cnt[j] >= k) {
			ans[j] += cnt[j] / k;
		}
	}
	int Ans = 0;
	for(int j = 0; j < 26; ++j) {
		Ans = max(Ans, ans[j]);
	}
	outn(Ans);
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll n;cin>>n;ll a[n];ll sum=0;ll pum=0;string first="";string second="";int p=0;int q=0;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]>0)
        {
            sum+=a[i];
            first+=char(a[i]+48);
            q++;
        }
        else
        {
            pum+=abs(a[i]);
            second+=char(abs(a[i])+48);
            q++;
        }
    }
    stringstream geek(first);
    ll x = 0;
    geek >> x;
    stringstream seek(second);
    ll y = 0;
    seek >> y;

    if(sum>pum)
        cout<<"first";
    if(pum>sum)
        cout<<"second";
    if(sum==pum && x<y)
        cout<<"first";
    if(sum==pum && x>y)
        cout<<"second";
    if(sum==pum && x==y)
    {
        if(q%2!=0)
            cout<<"first";
        else
            cout<<"second";
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    int n;cin>>n;ll sum=0;ll pum=0;vector<int>v[2];int x;int q=0;
    for(int i=0;i<n;i++)
    {
        cin>>x;
        if(x>0)
            {sum+=abs(x);
              v[0].push_back(x);q=1;
              }
        else
           {
               pum+=abs(x);
               v[1].push_back(abs(x));q=2;
               }
    }
    if(sum>pum)
        cout<<"first";
   else  if(sum<pum)
    cout<<"second";
   else  if(sum==pum)
    {

            for(int i=0;i<min(v[0].size(),v[1].size());i++)
            {
                if(v[0][i]>v[1][i])
                {
                    cout<<"first";
                    return 0;
                }
                else if(v[0][i]<v[1][i])
                {
                    cout<<"second";
                    return 0;
                }
            }
            if(v[0].size()>v[1].size())
            {
                cout<<"second";return 0;
            }
            if(v[0].size()<v[1].size())
            {
                cout<<"first";return 0;
            }
            else
        {
        if(q==1)
            cout<<"first";
        else
            cout<<"second";
        }

    }

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll n;cin>>n;ll a[n];ll sum=0;ll pum=0;string first="";string second="";int p=0;int q=0;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]>0)
        {
            sum+=a[i];
            first+=char(a[i]+48);
            q++;
        }
        else
        {
            pum+=abs(a[i]);
            second+=char(abs(a[i])+48);
            q++;
        }
    }
    stringstream geek(first);
    ll x = 0;
    geek >> x;
    stringstream seek(second);
    ll y = 0;
    seek >> y;
   // cout<<x<<" "<<y;
    if(sum>pum)
        cout<<"first";
    else if(pum>sum)
        cout<<"second";
    else if(sum==pum && x>y)
        cout<<"first";
   else  if(sum==pum && x<y)
        cout<<"second";
    else if(sum==pum && x==y)
    {
        if(q%2!=0)
            cout<<"first";
        else
            cout<<"second";
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll n;cin>>n;ll a[n];ll sum=0;ll pum=0;string first="";string second="";int p=0;int q=0;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]>0)
        {
            sum+=a[i];
            first+=char(97+a[i]);
            q++;
        }
        else
        {
            pum+=abs(a[i]);
            second+=char(97+abs(a[i]));
            q++;
        }
    }
    //cout<<first<<" "<<second;
    if(sum>pum)
        cout<<"first";
    else if(pum>sum)
        cout<<"second";
    else if(sum==pum && first>second)
        cout<<"first";
   else  if(sum==pum && first<second)
        cout<<"second";
    else if(sum==pum && first==second)
    {
        if(q%2!=0)
            cout<<"first";
        else
            cout<<"second";
    }
}


def c(s1, s2):
	i = 0
	len1 = len(s1)
	len2 = len(s2)
	while True:
		if(i == len1 and i == len2):
			return 2
		if(i == len1):
			return 0
		if(i == len2):
			return 1
		if(s1[i] > s2[i]):
			return 1
		if(s1[i] < s2[i]):
			return 0
		i += 1

t = int(input())
_sum = 0
w1 = ''
w2 = ''
last = -1

for i in range(0, t):
	a = int(input())
	if a > 0:
		w1 += str(a)
		last = 1
	elif a < 0:
		w2 += str(-a)
		last = 2
	_sum += a

if _sum > 0:
	print('first')
elif _sum < 0:
	print('second')
else:
	res = c(w1,w2)
	if res == 1:
		print('first')
	elif res == 0:
		print('second')
	else:
		if last == 1:
			print('first')
		else:
			print('second')

// 1511615007286


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main () {
	ios::sync_with_stdio(0);
	cin.tie(0);

	ll	n,
		a,
		f = 0,
		s = 0;

	queue<ll> first;
	queue<ll> second;

	bool fl = false;

	cin >> n;

	while (n--) {
		cin >> a;

		if (a > 0) {
			first.push(a);
			f += a;

			if (n == 0) {
				fl = true;
			}
		} else if (a < 0) {
			second.push(-a);
			s -= a;
		}
	}

	if (f > s) {
		cout << "first\n";
	} else if (s > f) {
		cout << "second\n";
	} else {
		while (!first.empty() && !second.empty() && first.front() == second.front()) {
			first.pop();
			second.pop();
		}

		if (first.empty() && !second.empty()) {
			cout << "second\n";
		} else if (!first.empty() && second.empty()) {
			cout << "first\n";
		} else if (first.front() > second.front()) {
			cout << "first\n";
		} else if (first.front() < second.front()) {
			cout << "second\n";
		} else {
			if (fl) {
				cout << "first\n";
			} else {
				cout << "second\n";
			}
		}
	}

	return 0;
}
// 1511611221330


#include <bits/stdc++.h>
#define X first
#define Y second

using namespace std;

const int maxn = 1e6;

typedef long long ll;

main() {
	ios::sync_with_stdio(0), cin.tie(0);
	vector<ll> a, b;
	ll n, suma = 0, sumb = 0; cin >> n;

	for(int i = 0; i < n; i++) {
		ll x; cin >> x;
		if(x > 0) {
			suma += x;
			a.push_back(x);
		} else if(x < 0) {
			sumb += -x;
			b.push_back(-x);
		}
	}
	if(suma == sumb) {
		for(int i = 0; ; i++) {
			if(i > a.size()) {
				puts("second");
				break;
			}

			if(i > b.size()) {
				puts("first");
				break;
			}

			if(a[i] > b[i]) {
				puts("first");
				break;
			}

			if(b[i] > a[i]) {
				puts("second");
				break;
			}
		}
	} else {
		if(suma > sumb) puts("first");
		else puts("second");
	}
	return 0;
}
// 1511620159095


#include <bits/stdc++.h>
using namespace std;
bool isLarger(string x, string y){
	bool ret1 = false, ret2 = false;
	if(x.size() > y.size()){
		ret1 = true;
		for(int i = 0; i < y.size(); i++){
			if(x[i] != y[i]){
				ret1 = false;
				break;
			}
		}
	}

	for(int i = 1; i < min(x.size(),y.size()); i++){
		if(x[i] != y[i]){
			if(x[i] > y[i]){
				ret2 = true;
			}else{
				break;
			}
		}
	}
	return ret1 || ret2;
}
int main(){
	string a,b;
	long long pa=0,pb=0;
	int n;
	cin >> n;
	bool ultimo;
	for(int i = 0; i < n; i++){
		long long x;
		cin >> x;
		if(x > 0){
			pa += x;
			a += to_string(x);
			ultimo = true;
		}else{
			pb += -x;
			b += to_string(-x);
			ultimo = false;
		}
	}
	if(pa != pb){
		if(pa > pb){
			cout << "first" << endl;
		}else{
			cout << "second" << endl;
		}
	}else{
		if(isLarger(a,b)){
			cout << "first" << endl;
		}else{
			if(isLarger(b,a)){
				cout << "second" << endl;
			}else{
				if(ultimo){
					cout << "first" << endl;
				}else{
					cout << "second" << endl;
				}
			}
		}
	}
	return 0;
}
// 1511621124486


#include <bits/stdc++.h>

#define fi first
#define se second

using namespace std;

typedef long long ll;

string getstring(int x){
    string a = "";
    while(x > 0){
        int u = x%10;
        a += (u + '0');
        x /= 10;
    }
    reverse(a.begin(), a.end());
    return a;
}

int main(){

    int n; scanf("%d", &n);

    string fst = "", scnd = "";

    ll sumfst = 0, sumscnd = 0;

    int last;

    for(int i = 0; i < n; ++i){
        ll x; scanf("%lld", &x);
        string a = getstring(abs(x));
        if(i == n-1) last = x;
        if(x < 0){
            x *= -1LL;
            sumscnd += x;
            scnd += a;
        } else{
            sumfst += x;
            fst += a;
        }
    }

    if(sumfst > sumscnd){
        printf("first\n");
    } else if(sumfst < sumscnd){
        printf("second\n");
    } else{
        int u = fst.compare(scnd);
        if(u > 0){
            printf("first\n");
        } else if(u < 0){
            printf("second\n");
        } else{
            if(last > 0){
                printf("first\n");
            } else printf("second\n");
        }
    }

    return 0;
}
// 1511612260239


#include <iostream>
#include <string>
#define LLI long long int

using namespace std;

int c(string s1, string s2) {
	for(int i = 0 ; 1 ; ++i) {
		if(i >= s1.length() && i >= s2.length())
			return 2;
		if(i >= s1.length())
			return 1;
		if(i >= s2.length())
			return 0;
		if(s1[i] > s2[i])
			return 1;
		if(s1[i] < s2[i])
			return 0;
	}
}

int main() {
	LLI n;
	scanf("%lld", &n);
	string w1 = "";
	string w2 = "";
	LLI sum = 0, last = 0;
	for(int i = 0 ; i < n ; ++i) {
		LLI k;
		scanf("%lld", &k);
		if(k > 0) {
			w1 += to_string(k);
			last = 1;
		}
		else {
			w2 += to_string(-k);
			last = 2;
		}
		sum += k;
	}
	if(sum > 0) {
		cout << "first" << endl;
	}
	else if(sum < 0) {
		cout << "second" << endl;
	} else {
		if(c(w1,w2) == 1)
			cout << "first" << endl;
		else if(c(w1,w2) == 0)
			cout << "second" << endl;
		else {
			cout << (last == 1 ? "first" : "second") << endl;
		}
	}
	return 0;
}
// 1511610464583


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;

const int SIZE = 2E5 + 5;

ll tasks[SIZE];
vll um, dois;
ll total1, total2;

int main() {
	int n;
	scanf("%d", &n);
	bool ultimoPrimeiro = false;
	for(int i = 0; i < n; i++) {
		scanf("%lld", &tasks[i]);
		ultimoPrimeiro = tasks[i] > 0;
		if(tasks[i] > 0) {
			total1 += tasks[i];
			um.push_back(tasks[i]);
		} else {
			tasks[i] *= -1;
			total2 += tasks[i];
			dois.push_back(tasks[i]);
		}
	}
	if(total1 > total2) {
		puts("first");
	} else if(total2 > total1) {
		puts("second");
	} else {
		if(um > dois) {
			puts("first");
		} else if(dois > um) {
			puts("no");
		} else {
			if(ultimoPrimeiro) {
				puts("first");
			} else {
				puts("second");
			}
		}
	}
	return 0;
}
// 1511610071581


#include <bits/stdc++.h>
using namespace std;
bool isLarger(string x, string y){
	if(x.size() > y.size()){
		return true;
	}

	for(int i = 0; i < min(x.size(), y.size()); i++){
		if(x[i] != y[i]){
			return x[i] > y[i];
		}
	}

	return false;
}
int main(){
	string a,b;
	long long pa=0,pb=0;
	int n;
	cin >> n;
	bool ultimo;
	for(int i = 0; i < n; i++){
		long long x;
		cin >> x;
		if(x > 0){
			pa += x;
			a += to_string(x);
			ultimo = true;
		}else{
			x *= -1LL;
			pb += x;
			b += to_string(x);
			ultimo = false;
		}
	}
	if(pa != pb){
		if(pa > pb){
			cout << "first" << endl;
		}else{
			cout << "second" << endl;
		}
	}else{
		if(isLarger(a,b)){
			cout << "first" << endl;
		}else{
			if(isLarger(b,a)){
				cout << "second" << endl;
			}else{
				if(ultimo){
					cout << "first" << endl;
				}else{
					cout << "second" << endl;
				}
			}
		}
	}
	return 0;
}
// 1511611791403


#include <bits/stdc++.h>
#define X first
#define Y second

using namespace std;

const int maxn = 1e6;

typedef long long ll;

main() {
	ios::sync_with_stdio(0), cin.tie(0);
	vector<ll> a, b;
	ll n, suma = 0, sumb = 0; cin >> n;

	for(int i = 0; i < n; i++) {
		ll x; cin >> x;
		if(x > 0) {
			suma += x;
			a.push_back(x);
		} else if(x < 0) {
			sumb += abs(x);
			b.push_back(abs(x));
		}
	}
	if(suma == sumb) {
		bool cond = false;
		for(int i = 0; i < a.size() && i < b.size(); i++) {
			if(to_string(a[i]) > to_string(b[i])) {
				cond = true;
				break;
			} else if(to_string(a[i]) < to_string(b[i])) {
				break;
			}

			if(i+1 == a.size() && i+1 != b.size()) {
				break;
			}
			if(i+1 == b.size() && i+1 != a.size()) {
				cond = true;
				break;
			}
		}
		if(cond) {
			puts("first");
		} else {
			puts("second");
		}
	} else {
		if(suma > sumb) puts("first");
		else puts("second");
	}
	return 0;
}
// 1511619413211


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main () {
	ios::sync_with_stdio(0);
	cin.tie(0);

	ll	n,
		a,
		f = 0,
		s = 0;

	queue<ll> first;
	queue<ll> second;

	bool fl = false;

	cin >> n;

	while (n--) {
		cin >> a;

		if (a > 0) {
			first.push(a);
			f += a;

			if (n == 0) {
				fl = true;
			}
		} else if (a < 0) {
			second.push(-a);
			s -= a;
		}
	}

	if (f > s) { // O primeiro fez mais pontos
		cout << "first\n";
	} else if (f < s) { // O segundo fez mais pontos
		cout << "second\n";
	} else { // A soma é igual
		while (!first.empty() && !second.empty() && first.front() == second.front()) { // vai até o primeiro resultado que seja diferente entre os dois
			first.pop();
			second.pop();
		}

		if (first.empty() && !second.empty()) { // Se o primeiro tiver acabado, mas não o segundo
			cout << "second\n";
		} else if (!first.empty() && second.empty()) { // Se o segundo tiver acabado, mas não o primeiro
			cout << "first\n";
		} else if (first.front() > second.front()) { // Se o primeiro resultado diferente do primeiro foi maior
			cout << "first\n";
		} else if (first.front() < second.front()) { // Se o primeiro resultado diferente do segundo foi maior
			cout << "second\n";
		} else {
			if (fl) {
				cout << "first\n";
			} else {
				cout << "second\n";
			}
		}
	}

	return 0;
}
// 1511619684539


#include <iostream>
#include <vector>
#define LLI long long int

using namespace std;

int c(vector<LLI> s1, vector<LLI> s2) {
	for(LLI i = 0 ; 1 ; ++i) {
		if(i >= s1.size() && i >= s2.size())
			return 2;
		if(i >= s1.size())
			return 1;
		if(i >= s2.size())
			return 0;
		if(s1[i] > s2[i])
			return 1;
		if(s1[i] < s2[i])
			return 0;
	}
}

int main() {
	LLI n;
	scanf("%lld", &n);
	vector<LLI> w1;
	vector<LLI> w2;
	LLI sum = 0, last = 0;
	for(LLI i = 0 ; i < n ; ++i) {
		LLI k;
		scanf("%lld", &k);
		if(k > 0) {
			w1.push_back(k);
			last = 1;
		}
		else {
			w2.push_back(-k);
			last = 2;
		}
		sum += (LLI)k;
	}
	if(sum > 0) {
		cout << "first" << endl;
	}
	else if(sum < 0) {
		cout << "second" << endl;
	} else {
		int res = c(w1,w2);
		if(res == 1)
			cout << "first" << endl;
		else if(res == 0)
			cout << "second" << endl;
		else {
			cout << (last == 1 ? "first" : "second") << endl;
		}
	}
	return 0;
}
// 1511618243332


#include <bits/stdc++.h>
#define X first
#define Y second

#define int long long

using namespace std;

const int maxn = 1e6;

typedef pair<int, int> ii;

ii v[maxn];

main() {
	ios::sync_with_stdio(0), cin.tie(0);
	vector<int> a, b;
	int n, suma = 0, sumb = 0; cin >> n;

	for(int i = 0; i < n; i++) {
		int x; cin >> x;
		if(x > 0) {
			suma += x;
			a.push_back(x);
		} else if(x < 0) {
			sumb += abs(x);
			b.push_back(abs(x));
		}
	}
	if(suma == sumb) {
		bool cond = false;
		for(int i = 0; i < a.size() && i < b.size(); i++) {
			if(a[i] > b[i]) {
				cond = true;
				break;
			} else if(a[i] < b[i]) {
				break;
			}

			if(i+1 == a.size() && i+1 != b.size()) {
				break;
			}
			if(i+1 == b.size() && i+1 != a.size()) {
				cond = true;
				break;
			}
		}
		if(cond) {
			puts("first");
		} else {
			puts("second");
		}
	} else {
		if(suma > sumb) {
			puts("first");
		} else {
			puts("second");
		}
	}
	return 0;
}
// 1511613444205


#include <bits/stdc++.h>
using namespace std;
bool isLarger(string x, string y){
	bool ret1 = false, ret2 = false;
	if(x.size() > y.size()){
		ret1 = true;
		for(int i = 0; i < y.size(); i++){
			if(x[i] != y[i]){
				ret1 = false;
				break;
			}
		}
	}

	for(int i = 1; i < min(x.size(),y.size()); i++){
		if(x[i] != y[i]){
			if(x[i] > y[i]){
				ret2 = true;
				break;
			}else{
				break;
			}
		}
	}
	if(x[0] != y[0]) ret2 = false;
	return ret1 || ret2;
}
int main(){
	string a,b;
	long long pa=0,pb=0;
	int n;
	cin >> n;
	bool ultimo;
	for(int i = 0; i < n; i++){
		long long x;
		cin >> x;
		if(x > 0){
			pa += x;
			a += to_string(x);
			ultimo = true;
		}else{
			pb += -x;
			b += to_string(-x);
			ultimo = false;
		}
	}
	if(pa != pb){
		if(pa > pb){
			cout << "first" << endl;
		}else{
			cout << "second" << endl;
		}
	}else{
		if(isLarger(a,b)){
				cout << "first" << endl;
		}else{
			if(isLarger(b,a)){
				cout << "second" << endl;
			}else{
				if(ultimo){
					cout << "first" << endl;
				}else{
					cout << "second" << endl;
				}
			}
		}
	}
	return 0;
}
// 1511627160883


#include <bits/stdc++.h>
#define X first
#define Y second

using namespace std;

const int maxn = 1e6;

typedef long long ll;

main() {
	ios::sync_with_stdio(0), cin.tie(0);
	vector<ll> a, b;
	ll n, last = 0, sum = 0; cin >> n;

	for(int i = 0; i < n; i++) {
		ll x; cin >> x;
		sum += x;
		if(x > 0) {
			a.push_back(x);
			last = 1;
		} else if(x < 0) {
			b.push_back(-x);
			last = 2;
		}
	}
	if(!sum) {
		if(a == b) {
			if(last == 1) {
				puts("first");
			} else {
				puts("second");
			}
		} else {
			if(a > b) puts("first");
			else puts("second");
		}
	} else {
		if(sum > 0) puts("first");
		else puts("second");
	}
	return 0;
}
// 1511620490876


#include <bits/stdc++.h>
using namespace std;
bool isLarger(string x, string y){
	bool ret1 = false, ret2 = false;
	if(x.size() > y.size()){
		ret1 = true;
		for(int i = 0; i < y.size(); i++){
			if(x[i] != y[i]){
				ret1 = false;
				break;
			}
		}
	}

	for(int i = 0; i < min(x.size(),y.size()); i++){
		if(x[i] != y[i]){
			if(x[i] > y[i]){
				ret2 = true;
				break;
			}else{
				break;
			}
		}
	}
	return ret1 || ret2;
}
int main(){
	string a,b;
	long long pa=0,pb=0;
	int n;
	cin >> n;
	bool ultimo;
	for(int i = 0; i < n; i++){
		long long x;
		cin >> x;
		if(x > 0){
			pa += x;
			a += to_string(x);
			ultimo = true;
		}else{
			pb += -x;
			b += to_string(-x);
			ultimo = false;
		}
	}
	if(pa != pb){
		if(pa > pb){
			cout << "first" << endl;
		}else{
			cout << "second" << endl;
		}
	}else{
		if(isLarger(a,b)){
			if(!isLarger(b,a)){
				cout << "first" << endl;
			}else{
				if(ultimo){
					cout << "first" << endl;
				}else{
					cout << "second" << endl;
				}
			}
		}else{
			if(isLarger(b,a)){
				cout << "second" << endl;
			}else{
				if(ultimo){
					cout << "first" << endl;
				}else{
					cout << "second" << endl;
				}
			}
		}
	}
	return 0;
}
// 1511625260421


#include <bits/stdc++.h>
#define X first
#define Y second

#define int long long

using namespace std;

const int maxn = 1e6;

typedef pair<int, int> ii;

main() {
	ios::sync_with_stdio(0), cin.tie(0);
	string a, b;
	int n, suma = 0, sumb = 0; cin >> n;

	for(int i = 0; i < n; i++) {
		int x; cin >> x;
		if(x > 0) {
			suma += x;
			a += to_string(x);
		} else if(x < 0) {
			sumb += -1LL*x;
			b += to_string(-1LL*x);
		}
	}
	if(suma == sumb) {
		if(a > b) {
			puts("first");
		} else {
			puts("second");
		}
	} else {
		if(suma > sumb) {
			puts("first");
		} else {
			puts("second");
		}
	}
	return 0;
}
// 1511618662578


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;

const int SIZE = 2E5 + 5;

ll tasks[SIZE];
vll um, dois;
ll total1, total2;

int main() {
	int n;
	scanf("%d", &n);
	bool ultimoPrimeiro = false;
	for(int i = 0; i < n; i++) {
		scanf("%lld", &tasks[i]);
		ultimoPrimeiro = tasks[i] > 0;
		if(tasks[i] > 0) {
			total1 += tasks[i];
			um.push_back(tasks[i]);
		} else {
			tasks[i] *= -1;
			total2 += tasks[i];
			dois.push_back(tasks[i]);
		}
	}
	if(total1 > total2) {
		puts("first");
	} else if(total2 > total1) {
		puts("second");
	} else {
		if(um > dois) {
			puts("first");
		} else if(dois > um) {
			puts("second");
		} else {
			if(ultimoPrimeiro) {
				puts("first");
			} else {
				puts("second");
			}
		}
	}
	return 0;
}
// 1511610115864


#include <bits/stdc++.h>

using namespace std;

int n, temp;
long long sumA, sumB;
bool lastA;
vector<int> a, b;

int main() {
	cin >> n;
	while (n--) {
		cin >> temp;
		if (temp > 0) {
			a.push_back(temp);
			sumA += temp;
			lastA = true;
		} else {
			b.push_back(-temp);
			sumB -= temp;
			lastA = false;
		}
	}
	if (sumA > sumB) cout << "first";
	else if (sumA < sumB) cout << "second";
	else {
		int minTam = min(a.size(), b.size());
		for (int i = 0; i < minTam; i++) {
			if (a[i] == b[i]) continue;
			if (a[i] > b[i]) cout << "first";
			else cout << "second";
			minTam = 0;
		}
		if (minTam) {
			if (a.size() > b.size()) cout << "first";
			else if (a.size() < b.size()) cout << "second";
			else if (lastA) cout << "first";
			else cout << "second";
		}
	}
	return 0;
}
// 1511610850592


#include<bits/stdc++.h>
#define int long long
using namespace std;
int main()
{
    int  n;
    cin >> n;
    int first = 0;
    int second = 0;
    int x;
    while(n--){
        cin >> x;
        if(x >= 1)first += x;
        if(x <= -1)second += abs(x);

    }
    if(first < second)return cout << "second",0;
    if(first > second)return cout <<"first",0;
    if(first == second){
        if(x >= 1)cout <<"first";
        else cout <<"second";
        return 0;
    }

}


#include<bits/stdc++.h>
#define int long long
using namespace std;
main()
{
    int  n;
    cin >> n;
    vector<int> first;
    vector<int> second;
    int x;
    while(n--)
    {
        cin >> x;
        if(x >= 1){first.push_back(x);}
        if(x <= -1){second.push_back(abs(x));}

    }
    for(int i = 0 ; i < min((int)first.size(),(int)second.size());i++){
        if(first[i] == second[i])continue;
        else{
            if(first[i] > second[i]){
                return cout << "first",0;
            }
            if(first[i] < second[i]){
                return cout <<"second",0;
            }
        }

    }
    if(first.size() > second.size())return cout <<"first",0;
    if(first.size() < second.size())return cout <<"second",0;
    if(x >= 1)cout << "first";
    else  cout <<"second";

}


#include<bits/stdc++.h>
#define int long long
using namespace std;
main()
{
    int  n;
    cin >> n;
    int first = 0;
    int second = 0;
    int x;
    while(n--){
        cin >> x;
        if(x >= 1)first += x;
        if(x <= -1)second += abs(x);

    }
    if(first < second)return cout << "second",0;
    if(first > second)return cout <<"first",0;
    if(first == second){
        if(x >= 1)cout <<"first";
        else cout <<"second";
        return 0;
    }

}


#include<bits/stdc++.h>
using namespace std;
main()
{
    int  n;
    cin >> n;
    vector<int> first;
    vector<int> second;
    int x;
    while(n--){
        cin >> x;
        if(x >= 1){first.push_back(x);}
        if(x <= -1){second.push_back(abs(x));}

    }
    for(int i = 0 ; i < min(first.size(),second.size());i++){
        if(first[i] == second[i])continue;
        else{
            if(first[i] > second[i]){
                return cout << "first",0;
            }
            if(first[i] < second[i]){
                return cout <<"second",0;
            }
        }

    }
    if(first.size() > second.size())return cout <<"first",0;
    if(first.size() < second.size())return cout <<"second",0;
    if(x >= 1)cout << "first";
    else  cout <<"second";

}


#include<bits/stdc++.h>
using namespace std;
main()
{
    int  n;
    cin >> n;
    vector<int> first;
    vector<int> second;
    int x;
    while(n--)
    {
        cin >> x;
        if(x >= 1){first.push_back(x);}
        if(x <= -1){second.push_back(abs(x));}

    }
    for(int i = 0 ; i < min((int)first.size(),(int)second.size());i++){
        if(first[i] == second[i])continue;
        else{
            if(first[i] > second[i]){
                return cout << "first",0;
            }
            if(first[i] < second[i]){
                return cout <<"second",0;
            }
        }

    }
    if(first.size() > second.size())return cout <<"first",0;
    if(first.size() < second.size())return cout <<"second",0;
    if(x >= 1)cout << "first";
    else  cout <<"second";

}


#include<bits/stdc++.h>
#define int long long
using namespace std;
main()
{
    int  n;
    cin >> n;
    vector<int> first;
    vector<int> second;
    int x;
    int summa1 , summa2;
    summa1 = summa2 = 0;
    while(n--)
    {
        cin >> x;
        if(x >= 1){first.push_back(x);summa1 += x;}
        if(x <= -1){second.push_back(abs(x)); summa1 += x;}

    }
    if(summa1 != 0){
        if(summa1 >= 1)
            cout <<"first";
        else
            cout <<"second";
        return 0;
    }
    for(int i = 0 ; i < min(first.size(),second.size());i++){
        if(first[i] > second[i]){
            return cout <<"first",0;
        }
        if(first[i] < second[i]){
            return cout <<"second",0;
        }
    }
    if(x >= 1)cout <<"first";
    else cout <<"second";

}


#include<bits/stdc++.h>
#define int long long
using namespace std;
main()
{
    int  n;
    cin >> n;
    vector<int> first;
    vector<int> second;
    int x;
    while(n--)
    {
        cin >> x;
        if(x >= 1){first.push_back(x);}
        if(x <= -1){second.push_back(abs(x));}

    }
    sort(first.begin(),first.end());
    sort(second.begin(),second.end());
    for(int i = 0 ; i < min((int)first.size(),(int)second.size());i++){
        if(first[i] == second[i])continue;
        else{
            if(first[i] > second[i]){
                return cout << "first",0;
            }
            if(first[i] < second[i]){
                return cout <<"second",0;
            }
        }

    }
    if(first.size() > second.size())return cout <<"first",0;
    if(first.size() < second.size())return cout <<"second",0;
    if(x >= 1 and first.size() == second.size())cout << "first";
    else  cout <<"second";

}


#include<bits/stdc++.h>
#define int long long
using namespace std;
main()
{
    int  n;
    cin >> n;
    vector<int> first;
    vector<int> second;
    int summa1,summa2;
    summa1 = summa2 = 0;
    int x;
    while(n--)
    {
        cin >> x;
        if(x >= 1){first.push_back(x);summa1 += x;}
        if(x <= -1){second.push_back(abs(x));summa2 += abs(x);}

    }
    if(summa1 > summa2){
        cout << "first";
        return 0;
    }
    if(summa1 < summa2){
        cout <<"second";
        return 0;
    }

    for(int i = 0 ; i < min((int)first.size(),(int)second.size());i++){
        if(first[i] == second[i])continue;
        else{
            if(first[i] > second[i]){
                return cout << "first",0;
            }
            if(first[i] < second[i]){
                return cout <<"second",0;
            }
        }

    }
    if(x >= 1 and first.size() == second.size())cout << "first";
    else  cout <<"second";

}


#include<bits/stdc++.h>
#define int long long
using namespace std;
main()
{
    int  n;
    cin >> n;
    vector<int> first;
    vector<int> second;
    int x;
    int summa1 , summa2;
    summa1 = summa2 = 0;
    while(n--)
    {
        cin >> x;
        if(x >= 1){first.push_back(x);summa1 += x;}
        if(x <= -1){second.push_back(abs(x)); summa2 += abs(x);}

    }
    if(summa1 > summa2){
        cout <<"first";
        return 0;

    }
    if(summa1 < summa2){
        cout <<"second";
        return 0;
    }
    if(summa1 == summa2 and first.size() < second.size()){
        cout << "second";
    return 0;
    }

    if(summa1 == summa2 and first.size() > second.size()){
         cout <<"first";
    return 0;

    }
    if(x >= 1 and first.size() == second.size())cout << "first";
    else  cout <<"second";

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int  n;
    cin >> n;
    int first = 0;
    int second = 0;
    int x;
    while(n--){
        cin >> x;
        if(x >= 1)first += x;
        if(x <= -1)second += abs(x);

    }
    if(first < second)return cout << "second",0;
    if(first > second)return cout <<"first",0;
    if(first == second){
        if(x >= 1)cout <<"first";
        else cout <<"second";
        return 0;
    }

}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int  n ;
    while(1)
    {
        /*cin>>n;
        string res ;
        ostringstream conv ;
        conv << n;
        res = conv.str();
        cout<<res<<endl;
        */
        int n;
        cin>>n;
        int a[n];
        int player1[n];
        int player2[n];
        bool p1w=false , p2w = false;
        int sum1 = 0 , sum2 = 0 , p1=0,p2=0;
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>0)
            {
                    player1[p1++] = a[i];
                    sum1+= a[i];
            }
            else
            {
                    player2 [p2++] = abs(a[i]);
                    sum2+= abs(a[i]);
            }
        }

        if(sum1>sum2)
            p1w = true;
        else if(sum2>sum1)
            p2w = true;
        else
        {
            if(p1>p2)
                p2w = true;
            else if(p1<p2)
                p1w = true;
            else
            {
                int i=0  ,  j=0;
                while(i<p1)
                {
                    if(player1[i]>player2[i])
                    {
                        p1w = true;
                        break;
                    }
                    else if(player2[i]<player1[i])
                    {
                        p2w = true;
                        break;
                    }
                    else if(a[n-1]<0)
                    {
                        p2w = true;
                    }
                    else
                    {
                        p1w = true;
                    }

                    i++;
                }
            }
        }

        if(p1w)
            cout<<"first\n";
        else if(p2w)
            cout<<"second\n";

            return 0;
    }
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int  n ;
    while(1)
    {
        /*cin>>n;
        string res ;
        ostringstream conv ;
        conv << n;
        res = conv.str();
        cout<<res<<endl;
        */
        int n;
        cin>>n;
        int a[n];
        int player1[n];
        int player2[n];
        bool p1w=false , p2w = false;
        int sum1 = 0 , sum2 = 0 , p1=0,p2=0;
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>0)
            {
                    player1[p1++] = a[i];
                    sum1+= a[i];
            }
            else
            {
                    player2 [p2++] = abs(a[i]);
                    sum2+= abs(a[i]);
            }
        }

        if(sum1>sum2)
            p1w = true;
        else if(sum2>sum1)
            p2w = true;
        else
        {
                int i=0  ,  j=0;
                int Min = min(p1,p2);
                while(i<Min)
                {
                    if(player1[i]>player2[i])
                    {
                        p1w = true;
                        break;
                    }
                    else if(player2[i]>player1[i])
                    {
                        p2w = true;
                        break;
                    }
                    else if(a[n-1]<0)
                    {
                        p2w = true;
                    }
                    else
                    {
                        p1w = true;
                    }

                    i++;
                }
        }

        if(p1w)
            cout<<"first\n";
        else if(p2w)
            cout<<"second\n";

            return 0;
    }
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int  n ;
    while(1)
    {
        /*cin>>n;
        string res ;
        ostringstream conv ;
        conv << n;
        res = conv.str();
        cout<<res<<endl;
        */
        int n;
        cin>>n;
        int a[n];
        int player1[n];
        int player2[n];
        bool p1w=false , p2w = false;
        int sum1 = 0 , sum2 = 0 , p1=0,p2=0;
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>0)
            {
                    player1[p1++] = a[i];
                    sum1+= a[i];
            }
            else
            {
                    player2 [p2++] = abs(a[i]);
                    sum2+= abs(a[i]);
            }
        }

        if(sum1>sum1)
            p1w = true;
        else if(sum2>sum1)
            p2w = true;
        else
        {
            if(p1>p2)
                p2w = true;
            else if(p1<p2)
                p1w = true;
            else
            {
                int i=0  ,  j=0;
                while(i<p1)
                {
                    if(player1[i]>player2[i])
                    {
                        p1w = true;
                        break;
                    }
                    else if(player2[i]<player1[i])
                    {
                        p2w = true;
                        break;
                    }
                    else if(a[n-1]<0)
                    {
                        p2w = true;
                    }
                    else
                    {
                        p1w = true;
                    }

                    i++;
                }
            }
        }

        if(p1w)
            cout<<"first\n";
        else if(p2w)
            cout<<"second\n";

            return 0;
    }
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int  n ;
    while(1)
    {
        /*cin>>n;
        string res ;
        ostringstream conv ;
        conv << n;
        res = conv.str();
        cout<<res<<endl;
        */
        ll n;
        cin>>n;
        ll a[n];
        ll player1[n];
        ll player2[n];
        bool p1w=false , p2w = false;
        ll sum1 = 0 , sum2 = 0 , p1=0,p2=0;
        for(ll i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>0)
            {
                    player1[p1++] = a[i];
                    sum1+= a[i];
            }
            else
            {
                    player2 [p2++] = abs(a[i]);
                    sum2+= abs(a[i]);
            }
        }

        if(sum1>sum2)
        {
            p1w = true;
            cout<<"first\n";
            return 0;
        }

        else if(sum2>sum1)
        {
            p2w = true;
            cout<<"second\n";
            return 0 ;
        }

        else
        {
                ll i=0  ,  j=0;
                ll Min = min(p1,p2);
                while(i<Min)
                {
                    if(player1[i]>player2[i])
                    {
                        p1w = true;
                        cout<<"first\n";
                        return 0;
                    }
                    else if(player2[i]>player1[i])
                    {
                        p2w = true;
                        cout<<"second\n";
                        return 0 ;
                    }
                    i++;
                }
                if(p1>p2)
                {
                    cout<<"first\n";
                    return 0;
                }
                else if(p1<p2)
                {
                    cout<<"second\n";
                    return 0;
                }
                else if(a[n-1]<0)
                    {
                        p2w = true;
                        cout<<"second\n";
                        return 0;
                    }
                    else
                    {
                        p1w = true;
                        cout<<"first\n";
                        return 0 ;
                    }
        }

        return 0 ;
    }
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int  n ;
    while(1)
    {
        /*cin>>n;
        string res ;
        ostringstream conv ;
        conv << n;
        res = conv.str();
        cout<<res<<endl;
        */
        int n;
        cin>>n;
        int a[n];
        int player1[n];
        int player2[n];
        bool p1w=false , p2w = false;
        int sum1 = 0 , sum2 = 0 , p1=0,p2=0;
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>0)
            {
                    player1[p1++] = a[i];
                    sum1+= a[i];
            }
            else
            {
                    player2 [p2++] = abs(a[i]);
                    sum2+= abs(a[i]);
            }
        }

        if(sum1>sum2)
        {
            p1w = true;
            cout<<"first\n";
            return 0;
        }

        else if(sum2>sum1)
        {
            p2w = true;
            cout<<"second\n";
            return 0 ;
        }

        else
        {
                int i=0  ,  j=0;
                int Min = min(p1,p2);
                while(i<Min)
                {
                    if(player1[i]>player2[i])
                    {
                        p1w = true;
                        cout<<"first\n";
                        return 0;
                    }
                    else if(player2[i]>player1[i])
                    {
                        p2w = true;
                        cout<<"second\n";
                        return 0 ;
                    }
                    i++;
                }
                if(p1>p2)
                {
                    cout<<"first\n";
                    return 0;
                }
                else if(p1<p2)
                {
                    cout<<"second\n";
                    return 0;
                }
                else if(a[n-1]<0)
                    {
                        p2w = true;
                        cout<<"second\n";
                        return 0;
                    }
                    else
                    {
                        p1w = true;
                        cout<<"first\n";
                        return 0 ;
                    }

        }

        return 0 ;
    }
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int  n ;
    while(1)
    {
        /*cin>>n;
        string res ;
        ostringstream conv ;
        conv << n;
        res = conv.str();
        cout<<res<<endl;
        */
        ll n;
        cin>>n;
        ll a[n];
        ll player1[n];
        ll player2[n];
        bool p1w=false , p2w = false;
        ll sum1 = 0 , sum2 = 0 , p1=0,p2=0;
        for(ll i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>0)
            {
                    player1[p1++] = a[i];
                    sum1+= a[i];
            }
            else
            {
                    player2 [p2++] = abs(a[i]);
                    sum2+= abs(a[i]);
            }
        }

        if(sum1>sum2)
        {
            p1w = true;
            cout<<"first\n";
            return 0;
        }

        else if(sum2>sum1)
        {
            p2w = true;
            cout<<"second\n";
            return 0 ;
        }

        else
        {
                ll i=0  ,  j=0;
                ll Min = min(p1,p2);
                while(i<Min)
                {
                    if(player1[i]>player2[i])
                    {
                        p1w = true;
                        cout<<"first\n";
                        return 0;
                    }
                    else if(player2[i]>player1[i])
                    {
                        p2w = true;
                        cout<<"second\n";
                        return 0 ;
                    }
                    i++;
                }
                 if(a[n-1]<0)
                    {
                        p2w = true;
                        cout<<"second\n";
                        return 0;
                    }
                    else
                    {
                        p1w = true;
                        cout<<"first\n";
                        return 0 ;
                    }
        }

        return 0 ;
    }
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int  n ;
    while(1)
    {
        /*cin>>n;
        string res ;
        ostringstream conv ;
        conv << n;
        res = conv.str();
        cout<<res<<endl;
        */
        int n;
        cin>>n;
        int a[n];
        int player1[n];
        int player2[n];
        bool p1w=false , p2w = false;
        int sum1 = 0 , sum2 = 0 , p1=0,p2=0;
        for(int i=0;i<n;i++)
        {
            cin>>a[i];
            if(a[i]>0)
            {
                    player1[p1++] = a[i];
                    sum1+= a[i];
            }
            else
            {
                    player2 [p2++] = abs(a[i]);
                    sum2+= abs(a[i]);
            }
        }

        if(sum1>sum2)
            p1w = true;
        else if(sum2>sum1)
            p2w = true;
        else
        {
                int i=0  ,  j=0;
                int Min = min(p1,p2);
                while(i<Min)
                {
                    if(player1[i]>player2[i])
                    {
                        p1w = true;
                        break;
                    }
                    else if(player2[i]>player1[i])
                    {
                        p2w = true;
                        break;
                    }
                    i++;
                }

                  if(a[n-1]<0 || p2>p1)
                    {
                        p2w = true;
                    }
                    else
                    {
                        p1w = true;
                    }

        }

        if(p1w)
            cout<<"first\n";
        else if(p2w)
            cout<<"second\n";

            return 0;
    }
}


#include <iostream>
#include <vector>

using namespace std;

int main() {

	long long int n, sum = 0;
	bool last = 0;
	cin >> n;
	vector<long long int> first, second;

	for (int i = 0; i < n; i++)
	{
		long long int num;
		cin >> num;
		sum += num;
		if (num > 0)
		{
			first.push_back(num);
		}
		else
		{
			second.push_back(abs(num));
			if (i == n - 1)
				last = 1;
		}
	}

	if (sum > 0)
	{
		cout << "first";
		return 0;
	}
	else if (sum < 0)
	{
		cout << "second";
		return 0;
	}
	else if (sum == 0)
	{
		int len = max(first.size(), second.size());
		bool equal = true;
		int i;
		for ( i = 0; i < len; i++)
		{
			if (first[i] != second[i])
			{
				equal = false;
				break;
			}

		}
		if (equal)
		{
			if (first.size() > second.size())
			{
				cout << "first";
				return 0;
			}
			else if (first.size() < second.size())
			{
				cout << "second";
				return 0;
			}
		}
		else if (first[i] > second[i])
		{
			cout << "first";
			return 0;
		}
		else if (second[i] > first[i])
		{
			cout << "second";
			return 0;
		}
	}
	if (!last)
		cout << "first";
	else
		cout << "second";

	return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {

	long long int n, sum = 0;
	bool last = 0, done = 0;
	cin >> n;
	vector<long long int> first, second;

	for (int i = 0; i < n; i++)
	{
		long long int num;
		cin >> num;
		sum += num;
		if (num > 0)
		{
			first.push_back(num);
		}
		else
		{
			second.push_back(abs(num));
			if (i == n - 1)
				last = 1;
		}
	}

	if (sum > 0)
	{
		cout << "first";
	}
	else if (sum < 0)
	{
		cout << "second";
	}
	else if (sum == 0)
	{
		int len = max(first.size(), second.size());
		bool equal = true;
		int i;
		for ( i = 0; i < len; i++)
		{
			if (first[i] != second[i])
			{
				equal = false;
				break;
			}

		}
		if (equal)
		{
			if (first.size() > second.size())
			{
				cout << "first";
				done = 1;
			}
			else if (first.size() < second.size())
			{
				cout << "second";
				done = 1;
			}
		}
		else if (first[i] > second[i])
		{
			cout << "first";
			done = 1;
		}
		else if (second[i] > first[i])
		{
			cout << "second";
			done = 1;
		}
	}

	if ( !done && sum == 0)
	{
		if (!last)
			cout << "first";
		else if (last && !done && sum == 0)
			cout << "second";
	}

	return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {

	long long int n, sum = 0, last;
	cin >> n;
	vector<long long int> first, second;

	for (int i = 0; i < n; i++)
	{
		long long int num;
		cin >> num;
		last = num;
		sum += num;
		if (num > 0)
			first.push_back(num);
		else
			second.push_back(abs(num));
	}

	if (sum > 0)
		cout << "first";
	else if (sum < 0)
		cout << "second";
	else if (sum == 0)
	{
		if (first > second)
			cout << "first";
		else if (second > first)
			cout << "second";
		else if (second == first)
		{
			if (last > 0)
				cout << "first";
			else
				cout << "second";
		}
	}

	return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {

	long long int n, sum = 0;
	bool last = 0;
	cin >> n;
	vector<long long int> first, second;

	for (int i = 0; i < n; i++)
	{
		long long int num;
		cin >> num;
		sum += num;
		if (num > 0)
		{
			first.push_back(num);
		}
		else
		{
			second.push_back(abs(num));
			if (i == n - 1)
				last = 1;
		}
	}

	if (sum > 0)
		cout << "first";
	else if (sum < 0)
		cout << "second";
	else if (sum == 0)
	{
		int len = max(first.size(), second.size());
		bool equal = true;
		int i;
		for ( i = 0; i < len; i++)
		{
			if (first[i] != second[i])
			{
				equal = false;
				break;
			}

		}
		if (equal)
		{
			if (first.size() > second.size())
			{
				cout << "first";
				return 0;
			}
			else if (first.size() < second.size())
			{
				cout << "second";
				return 0;
			}
		}
		else if (first[i] > second[i])
		{
			cout << "first";
			return 0;
		}
		else if (second[i] > first[i])
		{
			cout << "second";
			return 0;
		}
	}
	if (!last)
		cout << "first";
	else
		cout << "second";

	return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {

	long long int n, sum = 0;
	bool last = 0;
	cin >> n;
	vector<long long int> first, second;

	for (int i = 0; i < n; i++)
	{
		long long int num;
		cin >> num;
		sum += num;
		if (num > 0)
		{
			first.push_back(num);
		}
		else
		{
			second.push_back(abs(num));
			if (i == n - 1)
				last = 1;
		}
	}

	if (sum > 0)
		cout << "first";
	else if (sum < 0)
		cout << "second";
	else if (sum == 0)
	{
		int len = max(first.size(), second.size());
		bool equal = true;
		int i;
		for ( i = 0; i < len; i++)
		{
			if (first[i] != second[i])
			{
				equal = false;
				break;
			}

		}
		if (equal)
		{
			if (first.size() > second.size())
				cout << "first";
			else
				cout << "second";
		}
		else if (first[i] > second[i])
			cout << "first";
		else if (second[i] > first[i])
			cout << "second";
	}
	else if (!last)
		cout << "first";
	else
		cout << "second";

	return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {

	int n, sum = 0;
	bool last = 0;
	cin >> n;
	vector<int> first, second;

	for (int i = 0; i < n; i++)
	{
		int num;
		cin >> num;
		sum += num;
		if (num > 0)
		{
			first.push_back(num);
		}
		else
		{
			second.push_back(abs(num));
			if (i == n - 1)
				last = 1;
		}
	}

	if (sum > 0)
		cout << "first";
	else if (sum < 0)
		cout << "second";
	else if (sum == 0)
	{
		int len = max(first.size(), second.size());
		bool equal = true;
		int i;
		for ( i = 0; i < len; i++)
		{
			if (first[i] != second[i])
			{
				equal = false;
				break;
			}

		}
		if (equal)
		{
			if (first.size() > second.size())
				cout << "first";
			else
				cout << "second";
		}
		else if (first[i] > second[i])
			cout << "first";
		else if (second[i] > first[i])
			cout << "second";
	}
	else if (!last)
		cout << "first";
	else
		cout << "second";

	return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {

	int n, sum_a = 0, sum_b = 0;
	bool lex = 1, last = 1;
	cin >> n;
	vector<int> first, second;

	for (int i = 0; i < n; i++)
	{
		int num;
		cin >> num;
		if (num > 0)
		{
			sum_a += num;
			first.push_back(num);
			if (i == n - 1)
				last = 0;
		}
		else
			sum_b += -1 * num, second.push_back(-1 * num);
	}

	if (sum_a > sum_b)
	{
		cout << "first";
		return 0;
	}
	if (sum_a == sum_b)
	{
		int i = 0;
		if ((int)first.size() > (int)second.size())
		{
			for ( i = 0; i < n / 2; i++)
				if (first[i] != second[i])
				{
					lex = 0;
					break;
				}
			if (lex)
			{
				cout << "first";
				return 0;
			}
		}
		else if ( ( i < (int)first.size() && i < (int)second.size() && first[i] > second[i]) )
		{
			cout << "first";
			return 0;
		}
		else
			lex = 0;
	}
	if(!lex && !last && sum_a == sum_b)
	{
		cout << "first";
		return 0;
	}
	else
		cout << "second";

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<queue>
#include<functional>
#include<cstring>
#include<cmath>
using namespace std;

static int n;
static long long nums;
static vector<long long> v1, v2;

bool cmp(long long a, long long b)
{
	return a > b;
}

int main()
{
	while (scanf("%d", &n) != EOF)
	{
		v1.clear();
		v2.clear();
		int last = -1;
		long long sum1 = 0, sum2 = 0;
		for (int i = 0; i < n; i++)
		{
			scanf("%d", &nums);
			if (nums > 0) v1.push_back(nums), sum1+=nums;
			else v2.push_back(abs(nums)), sum2 += abs(nums);
			if (i == n - 1) last = (nums > 0 ? 1 : 0);
		}
		if (sum1 != sum2)
		{
			printf(sum1 > sum2 ? "first\n" : "second\n");
			continue;
		}
		int i = 0, j = 0;
		int ans = -1;
		while (i < v1.size() && j < v2.size())
		{
			if (v1[i] < v2[j])
			{
				ans = 0;
				break;
			}
			else if (v1[i]>v2[j])
			{
				ans = 1;
				break;
			}
			else ++i, ++j;
		}
		if (i < v1.size() && j == v2.size()) ans = 1;
		else if (j < v2.size() && i == v1.size()) ans = 0;
		else if (i == v1.size() && j == v2.size()) ans = last;
		printf(ans == 1 ? "first\n" : "second\n");
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<queue>
#include<functional>
#include<cstring>
#include<cmath>
using namespace std;

static int n, nums;
static vector<int> v1, v2;

int main()
{
	while (scanf("%d", &n) != EOF)
	{
		v1.clear();
		v2.clear();
		int last = -1;
		for (int i = 0; i < n; i++)
		{
			scanf("%d", &nums);
			if (nums > 0) v1.push_back(nums);
			else v2.push_back(abs(nums));
			if (i == n - 1) last = (nums > 0 ? 1 : 0);
		}
		int i = 0, j = 0;
		int ans = -1;
		while (i < v1.size() && j < v2.size())
		{
			if (v1[i] < v2[j])
			{
				ans = 0;
				break;
			}
			else if (v1[i]>v2[j])
			{
				ans = 1;
				break;
			}
			else ++i, ++j;
		}
		if (i < v1.size() && j == v2.size()) ans = 1;
		else if (j < v2.size() && i == v1.size()) ans = 0;
		else if (i == v1.size() && j == v2.size()) ans = last;
		printf(ans == 1 ? "first\n" : "second\n");
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<queue>
#include<functional>
#include<cstring>
#include<cmath>
using namespace std;

static int n;
static long long nums;
static vector<long long> v1, v2;

bool cmp(long long a, long long b)
{
	return a > b;
}

int main()
{
	while (scanf("%d", &n) != EOF)
	{
		v1.clear();
		v2.clear();
		int last = -1;
		long long sum1 = 0, sum2 = 0;
		for (int i = 0; i < n; i++)
		{
			scanf("%I64d", &nums);
			if (nums > 0) v1.push_back(nums), sum1+=nums;
			else v2.push_back(abs(nums)), sum2 += abs(nums);
			if (i == n - 1) last = (nums > 0 ? 1 : 0);
		}
		if (sum1 != sum2)
		{
			printf(sum1 > sum2 ? "first\n" : "second\n");
			continue;
		}
		int i = 0, j = 0;
		int ans = -1;
		while (i < v1.size() && j < v2.size())
		{
			if (v1[i] < v2[j])
			{
				ans = 0;
				break;
			}
			else if (v1[i]>v2[j])
			{
				ans = 1;
				break;
			}
			else ++i, ++j;
		}
		if (i < v1.size() && j == v2.size()) ans = 1;
		else if (j < v2.size() && i == v1.size()) ans = 0;
		else if (i == v1.size() && j == v2.size()) ans = last;
		printf(ans == 1 ? "first\n" : "second\n");
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<queue>
#include<functional>
#include<cstring>
#include<cmath>
using namespace std;

static int n, nums;
static vector<int> v1, v2;

bool cmp(int a, int b)
{
	return a > b;
}

int main()
{
	while (scanf("%d", &n) != EOF)
	{
		v1.clear();
		v2.clear();
		int last = -1;
		int sum1 = 0, sum2 = 0;
		for (int i = 0; i < n; i++)
		{
			scanf("%d", &nums);
			if (nums > 0) v1.push_back(nums), sum1+=nums;
			else v2.push_back(abs(nums)), sum2 += abs(nums);
			if (i == n - 1) last = (nums > 0 ? 1 : 0);
		}
		if (sum1 != sum2)
		{
			printf(sum1 > sum2 ? "first\n" : "second\n");
			continue;
		}
		int i = 0, j = 0;
		int ans = -1;
		while (i < v1.size() && j < v2.size())
		{
			if (v1[i] < v2[j])
			{
				ans = 0;
				break;
			}
			else if (v1[i]>v2[j])
			{
				ans = 1;
				break;
			}
			else ++i, ++j;
		}
		if (i < v1.size() && j == v2.size()) ans = 1;
		else if (j < v2.size() && i == v1.size()) ans = 0;
		else if (i == v1.size() && j == v2.size()) ans = last;
		printf(ans == 1 ? "first\n" : "second\n");
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<queue>
#include<functional>
#include<cstring>
#include<cmath>
using namespace std;

static int n, nums;
static vector<int> v1, v2;

int main()
{
	while (scanf("%d", &n) != EOF)
	{
		v1.clear();
		v2.clear();
		int last = -1;
		for (int i = 0; i < n; i++)
		{
			scanf("%d", &nums);
			if (nums > 0) v1.push_back(nums);
			else v2.push_back(abs(nums));
			if (i == n - 1) last = (nums > 0 ? 1 : 0);
		}
		int i = 0, j = 0;
		int ans = -1;
		while (i < v1.size() && j < v2.size())
		{
			if (v1[i] < v2[j])
			{
				ans = 0;
				break;
			}
			else if (v1[i]>v2[j])
			{
				ans = 1;
				break;
			}
			else ++i, ++j;
		}
		if (i == v1.size() && j == v2.size()) ans = last;
		printf(ans == 1 ? "first\n" : "second\n");
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<queue>
#include<functional>
#include<cstring>
#include<cmath>
using namespace std;

static int n, nums;
static vector<int> v1, v2;

bool cmp(int a, int b)
{
	return a > b;
}

int main()
{
	while (scanf("%d", &n) != EOF)
	{
		v1.clear();
		v2.clear();
		int last = -1;
		int sum1 = 0, sum2 = 0;
		for (int i = 0; i < n; i++)
		{
			scanf("%d", &nums);
			if (nums > 0) v1.push_back(nums), ++sum1;
			else v2.push_back(abs(nums)), ++sum2;
			if (i == n - 1) last = (nums > 0 ? 1 : 0);
		}
		if (sum1 != sum2)
		{
			printf(sum1 > sum2 ? "first\n" : "second\n");
			continue;
		}
		int i = 0, j = 0;
		int ans = -1;
		while (i < v1.size() && j < v2.size())
		{
			if (v1[i] < v2[j])
			{
				ans = 0;
				break;
			}
			else if (v1[i]>v2[j])
			{
				ans = 1;
				break;
			}
			else ++i, ++j;
		}
		if (i < v1.size() && j == v2.size()) ans = 1;
		else if (j < v2.size() && i == v1.size()) ans = 0;
		else if (i == v1.size() && j == v2.size()) ans = last;
		printf(ans == 1 ? "first\n" : "second\n");
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<queue>
#include<functional>
#include<cstring>
#include<cmath>
using namespace std;

static int n, nums;
static vector<int> v1, v2;

bool cmp(int a, int b)
{
	return b > a;
}

int main()
{
	while (scanf("%d", &n) != EOF)
	{
		v1.clear();
		v2.clear();
		int last = -1;
		for (int i = 0; i < n; i++)
		{
			scanf("%d", &nums);
			if (nums > 0) v1.push_back(nums);
			else v2.push_back(abs(nums));
			if (i == n - 1) last = (nums > 0 ? 1 : 0);
		}
		sort(v1.begin(), v1.end(), cmp);
		sort(v2.begin(), v2.end(), cmp);
		int i = 0, j = 0;
		int ans = -1;
		while (i < v1.size() && j < v2.size())
		{
			if (v1[i] < v2[j])
			{
				ans = 0;
				break;
			}
			else if (v1[i]>v2[j])
			{
				ans = 1;
				break;
			}
			else ++i, ++j;
		}
		if (i < v1.size() && j == v2.size()) ans = 1;
		else if (j < v2.size() && i == v1.size()) ans = 0;
		else if (i == v1.size() && j == v2.size()) ans = last;
		printf(ans == 1 ? "first\n" : "second\n");
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<queue>
#include<functional>
#include<cstring>
#include<cmath>
using namespace std;

static int n, nums;
static vector<int> v1, v2;

bool cmp(int a, int b)
{
	return a > b;
}

int main()
{
	while (scanf("%d", &n) != EOF)
	{
		v1.clear();
		v2.clear();
		int last = -1;
		for (int i = 0; i < n; i++)
		{
			scanf("%d", &nums);
			if (nums > 0) v1.push_back(nums);
			else v2.push_back(abs(nums));
			if (i == n - 1) last = (nums > 0 ? 1 : 0);
		}
		sort(v1.begin(), v1.end(), cmp);
		sort(v2.begin(), v2.end(), cmp);
		int i = 0, j = 0;
		int ans = -1;
		while (i < v1.size() && j < v2.size())
		{
			if (v1[i] < v2[j])
			{
				ans = 0;
				break;
			}
			else if (v1[i]>v2[j])
			{
				ans = 1;
				break;
			}
			else ++i, ++j;
		}
		if (i < v1.size() && j == v2.size()) ans = 1;
		else if (j < v2.size() && i == v1.size()) ans = 0;
		else if (i == v1.size() && j == v2.size()) ans = last;
		printf(ans == 1 ? "first\n" : "second\n");
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;

int main(){

	ll n;
	cin>>n;

	ll pointOne = 0, pointTwo = 0;
	string seqOne, seqTwo;
	ll lastVal = 0;
	while(n--){
		ll vl;
		cin>>vl;

		if(vl >	 0){
			lastVal = 1;
			pointOne += vl;
			seqOne += to_string(vl);
		} else {
			lastVal = 0;
			pointTwo += abs(vl);
			seqTwo += to_string(abs(vl));
		}
	}

	if(pointOne > pointTwo){
		cout<<"first"<<endl;
	} else if(pointOne < pointTwo){
		cout<<"second"<<endl;
	} else {

		if(seqOne.length() > seqTwo.length()){
			cout<<"first"<<endl;
		} else if(seqOne.length() < seqTwo.length()){
			cout<<"second"<<endl;
		} else {

			if(seqOne.compare(seqTwo) > 0){
				cout<<"first"<<endl;
			} else if(seqOne.compare(seqTwo) < 0){
				cout<<"second"<<endl;
			} else{

				if(lastVal == 0){
					cout<<"second"<<endl;
				} else {
					cout<<"first"<<endl;
				}
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;

int main(){

	ll n;
	cin>>n;

	ll pointOne = 0, pointTwo = 0;
	vector<ll> seqOne, seqTwo;
	ll lastVal = 0;
	while(n--){
		ll vl;
		cin>>vl;

		if(vl >	 0){
			lastVal = 1;
			pointOne += vl;
			seqOne.push_back(vl);
		} else {
			lastVal = 0;
			pointTwo += abs(vl);
			seqTwo.push_back(abs(vl));
		}
	}

	if(pointOne > pointTwo){
		cout<<"first"<<endl;
	} else if(pointOne < pointTwo){
		cout<<"second"<<endl;
	} else {

		// Try checking if the sequence of letters are different or not
		// If not, then return the result else at last return the size
		ll p1 = 0, p2 = 0;
		while(p1 < seqOne.size() && p2 < seqTwo.size()){

			if(seqOne[p1] < seqTwo[p2]){
				cout<<"second"<<endl;
				return 0;
			} else if(seqOne[p1] > seqTwo[p2]){
				cout<<"first"<<endl;
				return 0;
			}
			p1++;
			p2++;
		}

		// If the code reaches here we have same letters return the max size
		if(p2 == seqTwo.size() && p1 == seqOne.size()){
			if(lastVal == 0){
				cout<<"second"<<endl;
			} else {
				cout<<"first"<<endl;
			}
			return 0;
		}

		if(p2 < seqTwo.size()){
			cout<<"second"<<endl;
		} else {
			cout<<"first"<<endl;
		}
	}
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;

int main(){

	ll n;
	cin>>n;

	ll pointOne = 0, pointTwo = 0;
	string seqOne, seqTwo;
	ll lastVal = 0;
	while(n--){
		ll vl;
		cin>>vl;

		if(vl >	 0){
			lastVal = 1;
			pointOne += vl;
			seqOne += to_string(vl);
		} else {
			lastVal = 0;
			pointTwo += abs(vl);
			seqTwo += to_string(abs(vl));
		}
	}

	if(pointOne > pointTwo){
		cout<<"first"<<endl;
	} else if(pointOne < pointTwo){
		cout<<"Second"<<endl;
	} else {

		if(seqOne.compare(seqTwo) > 0){

			cout<<"first"<<endl;
		} else if(seqOne.compare(seqTwo) < 0){
			// cout<<"seqOne"<<seqOne<<endl;
			// cout<<"seqTwo"<<seqTwo<<endl;
			cout<<"second"<<endl;
		} else {
			if(lastVal == 0){
				cout<<"second"<<endl;
			} else {
				cout<<"first"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;

ll compareStr(vector<string> &s1, vector<string> &s2){

	if(s1.size() != s2.size()){
		return s1.size() - s2.size();
	}

	for(ll i=0;i<s1.size();i++){

		if(s1[i].compare(s2[i]) != 0){
			return s1[i].compare(s2[i]);
		}
	}
	return 0;
}

int main(){

	ll n;
	cin>>n;

	ll pointOne = 0, pointTwo = 0;
	vector<string> seqOne, seqTwo;
	ll lastVal = 0;
	ll count = 1;
	while(n--){
		ll vl;
		cin>>vl;

		if(vl >	 0){
			lastVal = 1;
			pointOne += vl;
			seqOne.push_back(to_string(vl));
		} else {
			lastVal = 0;
			pointTwo += abs(vl);
			seqTwo.push_back(to_string(abs(vl)));
		}
	}
	// cout<<"seqOne"<<seqOne<<endl;
	// cout<<"seqTwo"<<seqTwo<<endl;

	if(pointOne > pointTwo){
		cout<<"first"<<endl;
	} else if(pointOne < pointTwo){
		cout<<"second"<<endl;
	} else {

		if(compareStr(seqOne, seqTwo) > 0){

			cout<<"first"<<endl;
		} else if(compareStr(seqOne, seqTwo) < 0){
			cout<<"second"<<endl;
		} else {
			if(lastVal == 0){
				cout<<"second"<<endl;
			} else {
				cout<<"first"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;

int main(){

	ll n;
	cin>>n;

	ll pointOne = 0, pointTwo = 0;
	string seqOne, seqTwo;
	ll lastVal = 0;
	while(n--){
		ll vl;
		cin>>vl;

		if(vl >	 0){
			lastVal = 1;
			pointOne += vl;
			seqOne += to_string(vl);
		} else {
			lastVal = 0;
			pointTwo += abs(vl);
			seqTwo += to_string(abs(vl));
		}
	}

	if(pointOne > pointTwo){
		cout<<"first"<<endl;
	} else if(pointOne < pointTwo){
		cout<<"second"<<endl;
	} else {

		if(seqOne.compare(seqTwo) > 0){
			cout<<"first"<<endl;
		} else if(seqOne.compare(seqTwo) < 0){
			cout<<"second"<<endl;
		} else {
			if(lastVal == 0){
				cout<<"second"<<endl;
			} else {
				cout<<"first"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;

int main(){

	ll n;
	cin>>n;

	ll pointOne = 0, pointTwo = 0;
	string seqOne, seqTwo;
	ll lastVal = 0;
	while(n--){
		ll vl;
		cin>>vl;

		if(vl >	 0){
			lastVal = 1;
			pointOne += vl;
			seqOne += to_string(vl);
		} else {
			lastVal = 0;
			pointTwo += abs(vl);
			seqTwo += to_string(abs(vl));
		}
	}

	if(pointOne > pointTwo){
		cout<<"first"<<endl;
	} else if(pointOne < pointTwo){
		cout<<"second"<<endl;
	} else {

		if(seqOne.compare(seqTwo) > 0){

			cout<<"first"<<endl;
		} else if(seqOne.compare(seqTwo) < 0){
			// cout<<"seqOne"<<seqOne<<endl;
			// cout<<"seqTwo"<<seqTwo<<endl;
			cout<<"second"<<endl;
		} else {
			if(lastVal == 0){
				cout<<"second"<<endl;
			} else {
				cout<<"first"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long int
using namespace std;

int main(){

	ll n;
	cin>>n;

	ll pointOne = 0, pointTwo = 0;
	string seqOne, seqTwo;
	ll lastVal = 0;
	while(n--){
		ll vl;
		cin>>vl;

		if(vl >	 0){
			lastVal = 1;
			pointOne += vl;
			seqOne += (vl);
		} else {
			lastVal = 0;
			pointTwo += abs(vl);
			seqTwo += (abs(vl));
		}
	}

	if(pointOne > pointTwo){
		cout<<"first"<<endl;
	} else if(pointOne < pointTwo){
		cout<<"second"<<endl;
	} else {

		if(seqOne.compare(seqTwo) > 0){
			cout<<"first"<<endl;
		} else if(seqOne.compare(seqTwo) < 0){
			cout<<"second"<<endl;
		} else {
			if(lastVal == 0){
				cout<<"second"<<endl;
			} else {
				cout<<"first"<<endl;
			}
		}
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void file(){
#ifndef ONLINE_JUDGE
	freopen("a_input.txt", "r", stdin);
	freopen("a_output.txt", "w", stdout);
#endif
}
void fast()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
}
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int dx[] = { 0, 0, 1, -1, 1, 1, -1, -1 };
int dy[] = { 1, -1, 0, 0, 1, -1, 1, -1 };
int n, m;
vector<vector<char>> adj;
vector<vector<bool>> vis;
bool ok = 0;
bool valied(int i, int j){
	return i >= 0 && j >= 0 && i < n&&j < m;
}
string foo(int n){
	string s;
	while (n){
		s += n % 10;
		n /= 10;
	}
	reverse(s.begin(), s.end());
	return s;
}
int main(){
	file();
	fast();
	ll sum1 = 0, sum2 = 0;
	int n;
	cin >> n;
	int ok1 = -1;
	vector<int> s1, s2;
	while (n--){
		int x;
		cin >> x;
		bool ok = 1;
		if (x < 0){
			ok = 0;
			x *= -1;
		}
		if (ok){
			if (ok1=-1)
			ok1 = 1;
			s1.push_back(x);
			sum1 += x;
			continue;
		}
		if (ok1 = -1)
		ok1 = 0;
		s2.push_back(x);
		sum2 += x;
	}
	if (sum1>sum2)
		cout << "first";
	else if(sum2>sum1)
		cout << "second";
	else{
		for (int i = 0; i<min(s1.size(), s2.size());i++)
		if (s1[i]>s2[i]){
			cout << "first";
			return 0;
		}
		else if (s1[i]<s2[i]){
			cout << "second";
			return 0;
		}
		if (ok)
			cout << "first";
		else cout << "second";
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void file(){
#ifndef ONLINE_JUDGE
	freopen("a_input.txt", "r", stdin);
	freopen("a_output.txt", "w", stdout);
#endif
}
void fast()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
}
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int dx[] = { 0, 0, 1, -1, 1, 1, -1, -1 };
int dy[] = { 1, -1, 0, 0, 1, -1, 1, -1 };
int n, m;
vector<vector<char>> adj;
vector<vector<bool>> vis;
bool ok = 0;
bool valied(int i, int j){
	return i >= 0 && j >= 0 && i < n&&j < m;
}
void dfs(int x, int y, int px, int py){
	vis[x][y] = 1;
	for (int k = 0; k < 4; k++){
		int x1 = x + dx[k];
		int y1 = y + dy[k];
		if (!valied(x1, y1) || adj[x1][y1] != adj[x][y])continue;
		if (x1 == px&&y1 == py)continue;
		if (vis[x1][y1])
			ok = 1;
		else dfs(x1, y1, x, y);
	}
	adj[x][y] = '.';
}
int main(){
	file();
	fast();
	string s1, s2;
	int n;
	cin >> n;
	while (n--){
		string s;
		cin >> s;
		if (s[0] != '-'){
			s1 += s;
			continue;
		}
		for (int i = 1; i < s.size(); i++)
			s2 += s[i];
	}
	if (s1 > s2)
		cout << "first";
	else cout << "second";
}


#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void file(){
#ifndef ONLINE_JUDGE
	freopen("a_input.txt", "r", stdin);
	freopen("a_output.txt", "w", stdout);
#endif
}
void fast()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
}
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int dx[] = { 0, 0, 1, -1, 1, 1, -1, -1 };
int dy[] = { 1, -1, 0, 0, 1, -1, 1, -1 };
int n, m;
vector<vector<char>> adj;
vector<vector<bool>> vis;
bool ok = 0;
bool valied(int i, int j){
	return i >= 0 && j >= 0 && i < n&&j < m;
}
string foo(int n){
	string s;
	while (n){
		s += n % 10;
		n /= 10;
	}
	reverse(s.begin(), s.end());
	return s;
}
int main(){
	file();
	fast();
	string s1, s2;
	ll sum1 = 0, sum2 = 0;
	int n;
	cin >> n;
	bool ok1 = 1;
	while (n--){
		int x;
		cin >> x;
		bool ok = 1;
		if (x < 0){
			ok = 0;
			x *= -1;
		}
		string s=foo(x);
		if (ok){
			ok1 = 1;
			s1 += s;
			sum1 += x;
			continue;
		}
		ok1 = 0;
		s2 += s;
		sum2 += x;
	}
	if (sum1>sum2)
		cout << "first";
	else if(sum2>sum1)
		cout << "second";
	else if (s1 > s2)
		cout << "first";
	else if(s2>s1)
		cout << "second";
	else if (!ok1)
		cout << "first";
	else cout << "second";
}


#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void file(){
#ifndef ONLINE_JUDGE
	freopen("a_input.txt", "r", stdin);
	freopen("a_output.txt", "w", stdout);
#endif
}
void fast()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
}
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int dx[] = { 0, 0, 1, -1, 1, 1, -1, -1 };
int dy[] = { 1, -1, 0, 0, 1, -1, 1, -1 };
int n, m;
vector<vector<char>> adj;
vector<vector<bool>> vis;
bool ok = 0;
bool valied(int i, int j){
	return i >= 0 && j >= 0 && i < n&&j < m;
}
string foo(int n){
	string s;
	while (n){
		s += n % 10;
		n /= 10;
	}
	reverse(s.begin(), s.end());
	return s;
}
int main(){
	file();
	fast();
	string s1, s2;
	ll sum1 = 0, sum2 = 0;
	int x1, x2;
	int n;
	cin >> n;
	bool ok1 = 1;
	while (n--){
		int x;
		cin >> x;
		bool ok = 1;
		if (x < 0){
			ok = 0;
			x *= -1;
		}
		string s=foo(x);
		if (ok){
			ok1 = 1;
			s1 += s;
			sum1 += x;
			x1 = x;
			continue;
		}
		ok1 = 0;
		s2 += s;
		sum2 += x;
		x2 = x;
	}
	if (sum1>sum2)
		cout << "first";
	else if(sum2>sum1)
		cout << "second";
	else if (s1 > s2)
		cout << "first";
	else if(s2>s1)
		cout << "second";
	else if (ok1)
		cout << "first";
	else cout << "second";
}


#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void file(){
#ifndef ONLINE_JUDGE
	freopen("a_input.txt", "r", stdin);
	freopen("a_output.txt", "w", stdout);
#endif
}
void fast()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
}
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int dx[] = { 0, 0, 1, -1, 1, 1, -1, -1 };
int dy[] = { 1, -1, 0, 0, 1, -1, 1, -1 };
int n, m;
vector<vector<char>> adj;
vector<vector<bool>> vis;
int main(){
	file();
	fast();
	ll sum1 = 0, sum2 = 0;
	int n;
	cin >> n;
	int ok1 = -1;
	vector<int> s1, s2;
	while (n--){
		int x;
		cin >> x;
		bool ok = 1;
		if (x < 0){
			ok = 0;
			x *= -1;
		}
		if (ok){
			if (ok1=-1)
			ok1 = 1;
			s1.push_back(x);
			sum1 += x;
			continue;
		}
		if (ok1 = -1)
		ok1 = 0;
		s2.push_back(x);
		sum2 += x;
	}
	if (sum1>sum2)
		cout << "first";
	else if(sum2>sum1)
		cout << "second";
	else{
		for (int i = 0; i<min(s1.size(), s2.size());i++)
		if (s1[i]>s2[i]){
			cout << "first";
			return 0;
		}
		else if (s1[i]<s2[i]){
			cout << "second";
			return 0;
		}
		if (ok1)
			cout << "first";
		else cout << "second";
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void file(){
#ifndef ONLINE_JUDGE
	freopen("a_input.txt", "r", stdin);
	freopen("a_output.txt", "w", stdout);
#endif
}
void fast()
{
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
}
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }
int dx[] = { 0, 0, 1, -1, 1, 1, -1, -1 };
int dy[] = { 1, -1, 0, 0, 1, -1, 1, -1 };
int n, m;
vector<vector<char>> adj;
vector<vector<bool>> vis;
bool ok = 0;
bool valied(int i, int j){
	return i >= 0 && j >= 0 && i < n&&j < m;
}
string foo(int n){
	string s;
	while (n){
		s += n % 10;
		n /= 10;
	}
	reverse(s.begin(), s.end());
	return s;
}
int main(){
	file();
	fast();
	string s1, s2;
	int sum1 = 0, sum2 = 0;
	int x1, x2;
	int n;
	cin >> n;
	bool ok1 = 1;
	while (n--){
		int x;
		cin >> x;
		bool ok = 1;
		if (x < 0){
			ok = 0;
			x *= -1;
		}
		string s=foo(x);
		if (ok){
			ok1 = 1;
			s1 += s;
			sum1 += x;
			x1 = x;
			continue;
		}
		ok1 = 0;
		s2 += s;
		sum2 += x;
		x2 = x;
	}
	if (sum1>sum2)
		cout << "first";
	else if(sum2>sum1)
		cout << "second";
	else if (s1 > s2)
		cout << "first";
	else if(s2>s1)
		cout << "second";
	else if (ok1)
		cout << "first";
	else cout << "second";
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<string.h>
#include<ctype.h>
#include<utility>
#include<map>
#define MOD 1000000007
using namespace std;

int main()
{
	long long int n;
	vector<long long int> a;
	vector<long long int> b;
	cin>>n;
	long long int temp,count1=0,count2=0;
	for(long long int i=0 ; i<n ; i++)
	{
		cin>>temp;
		if(temp > 0)
		{
			a.push_back(temp);
			count1++;
		}
		else if(temp < 0)
		{
			b.push_back(0-temp);
			count2++;
		}
	}
	long long int sum1=0,sum2=0,flag=0,sig=0;
	for(long long int i=0 ; i<a.size() ; i++)
	{
		sum1+=a[i];
	}

	for(long long int i=0 ; i<b.size() ; i++)
	{
		sum2+=b[i];
	}
	if(sum1>sum2)
	{
		cout<<"first\n";
		return 0;
	}
	else if(sum2>sum1)
	{
		cout<<"second\n";
		return 0;
	}
	else if(sum1==sum2)
	{
		if(count1>count2)
		{
			for(long long i=0 ; i<b.size() ; i++)
			{
				if(a[i]>b[i])
				{
					sig=1;
					break;
				}
				if(a[i]!=b[i])flag=1;

			}
			if(sig==0 && flag==0){cout<<"second\n";return 0;}
			if(sig == 1){cout<<"first\n";return 0;}
		}
		else if(count1<count2)
		{
			for(long long i=0 ; i<a.size() ; i++)
			{
				if(b[i]>a[i])
				{
					sig=1;
					break;
				}
				if(b[i]!=a[i])flag=1;

			}
			if(sig==0 && flag=0){cout<<"first\n";return 0;}
			if(sig==1){cout<<"second\n";return 0;}
		}
	}
	if(sum1==sum2)
	{
		if(count1>count2){cout<<"first\n";return 0;}
		if(count2>count1){cout<<"second\n";return 0;}
		if( count1==count2 && temp>0)
		{
			cout<<"first\n";
		}
		else if(count1==count2 && temp<0)
		{
			cout<<"second\n";
		}
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<string.h>
#include<ctype.h>
#include<utility>
#include<map>
#define MOD 1000000007
using namespace std;

int main()
{
	long long int n;
	vector<long long int> a;
	vector<long long int> b;
	cin>>n;
	long long int temp,count1=0,count2=0;
	for(long long int i=0 ; i<n ; i++)
	{
		cin>>temp;
		if(temp > 0)
		{
			a.push_back(temp);
			count1++;
		}
		else if(temp < 0)
		{
			b.push_back(0-temp);
			count2++;
		}
	}
	long long int sum1=0,sum2=0,flag=0,sig=0;
	for(long long int i=0 ; i<a.size() ; i++)
	{
		sum1+=a[i];
	}

	for(long long int i=0 ; i<b.size() ; i++)
	{
		sum2+=b[i];
	}
	if(sum1>sum2)
	{
		cout<<"first\n";
		return 0;
	}
	else if(sum2>sum1)
	{
		cout<<"second\n";
		return 0;
	}
	else if(sum1==sum2)
	{
		if(count1>count2)
		{
			for(long long i=0 ; i<b.size() ; i++)
			{
				if(a[i] != b[i])
				{	flag=1;
					break;
				}
				if(a[i]>b[i])
				{
					sig=1;
					break;
				}

			}
			if(flag==0){cout<<"first\n";return 0;}
			if(sig == 1){cout<<"first\n";return 0;}
		}
		else if(count1<count2)
		{
			for(long long i=0 ; i<a.size() ; i++)
			{
				if(a[i] != b[i])
				{	flag=1;
					break;
				}
				if(b[i]>a[i])
				{
					sig=1;
					break;
				}

			}
			if(flag==0){cout<<"second\n";return 0;}
			if(sig==1){cout<<"second\n";return 0;}
		}
	}
	if(sum1==sum2)
	{
		if(count1>count2){cout<<"first\n";return 0;}
		if(count2>count1){cout<<"second\n";return 0;}
		if( count1==count2 && temp>0)
		{
			cout<<"first\n";
		}
		else if(count1==count2 && temp<0)
		{
			cout<<"second\n";
		}
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<string.h>
#include<ctype.h>
#include<utility>
#include<map>
#define MOD 1000000007
using namespace std;

int main()
{
	long long int n;
	vector<long long int> a;
	vector<long long int> b;
	cin>>n;
	long long int temp,count1=0,count2=0;
	for(long long int i=0 ; i<n ; i++)
	{
		cin>>temp;
		if(temp > 0)
		{
			a.push_back(temp);
			count1++;
		}
		else if(temp < 0)
		{
			b.push_back(0-temp);
			count2++;
		}
	}
	long long int sum1=0,sum2=0,flag=0,sig=0;
	for(long long int i=0 ; i<a.size() ; i++)
	{
		sum1+=a[i];
	}

	for(long long int i=0 ; i<b.size() ; i++)
	{
		sum2+=b[i];
	}
	if(sum1>sum2)
	{
		cout<<"first\n";
		return 0;
	}
	else if(sum2>sum1)
	{
		cout<<"second\n";
		return 0;
	}
	else if(sum1==sum2)
	{
		if(count1>count2)
		{
			for(long long i=0 ; i<b.size() ; i++)
			{
				if(a[i] != b[i])
				{	flag=1;
					break;
				}
				if(a[i]>b[i])
				{
					sig=1;
					break;
				}

			}
			if(flag==0){cout<<"first\n";return 0;}
			if(sig == 1){cout<<"first\n";return 0;}
		}
		else if(count1<count2)
		{
			for(long long i=0 ; i<a.size() ; i++)
			{
				if(a[i] != b[i])
				{	flag=1;
					break;
				}
				if(b[i]>a[i])
				{
					sig=1;
					break;
				}

			}
			if(flag==0){cout<<"second\n";return 0;}
			if(sig==1){cout<"second\n";return 0;}
		}
	}
	if(sum1==sum2)
	{
		if(temp>0)
		{
			cout<<"first\n";
			return 0;
		}
		else if(temp<0)
		{
			cout<<"second\n";
			return 0;
		}
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<string.h>
#include<ctype.h>
#include<utility>
#include<map>
#define MOD 1000000007
using namespace std;

int main()
{
	long long int n;
	vector<long long int> a;
	vector<long long int> b;
	cin>>n;
	long long int temp,count1=0,count2=0;
	for(long long int i=0 ; i<n ; i++)
	{
		cin>>temp;
		if(temp > 0)
		{
			a.push_back(temp);
			count1++;
		}
		else if(temp < 0)
		{
			b.push_back(0-temp);
			count2++;
		}
	}
	long long int sum1=0,sum2=0,flag=0,sig=0;
	for(long long int i=0 ; i<a.size() ; i++)
	{
		sum1+=a[i];
	}

	for(long long int i=0 ; i<b.size() ; i++)
	{
		sum2+=b[i];
	}
	if(sum1>sum2)
	{
		cout<<"first\n";
		return 0;
	}
	else if(sum2>sum1)
	{
		cout<<"second\n";
		return 0;
	}
	else if(sum1==sum2)
	{
		if(count1>count2)
		{
			for(long long i=0 ; i<b.size() ; i++)
			{
				if(a[i] != b[i])
				{	flag=1;
					break;
				}
				if(a[i]>b[i])
				{
					sig=1;
					break;
				}

			}
			if(flag==0){cout<<"first\n";return 0;}
			if(sig == 1){cout<<"first\n";return 0;}
		}
		else if(count1<count2)
		{
			for(long long i=0 ; i<a.size() ; i++)
			{
				if(a[i] != b[i])
				{	flag=1;
					break;
				}
				if(b[i]>a[i])
				{
					sig=1;
					break;
				}

			}
			if(flag==0){cout<<"second\n";return 0;}
			if(sig==1){cout<<"second\n";return 0;}
		}
	}
	if(sum1==sum2)
	{
		if(temp>0)
		{
			cout<<"first\n";
		}
		else if(temp<0)
		{
			cout<<"second\n";
		}
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<string.h>
#include<ctype.h>
#include<utility>
#include<map>
#define MOD 1000000007
using namespace std;

int main()
{
	long long int n;
	vector<long long int> a;
	vector<long long int> b;
	cin>>n;
	long long int temp,count1=0,count2=0;
	for(long long int i=0 ; i<n ; i++)
	{
		cin>>temp;
		if(temp > 0)
		{
			a.push_back(temp);
			count1++;
		}
		else if(temp < 0)
		{
			b.push_back(0-temp);
			count2++;
		}
	}
	long long int sum1=0,sum2=0,flag=0,sig=0;
	for(long long int i=0 ; i<a.size() ; i++)
	{
		sum1+=a[i];
	}

	for(long long int i=0 ; i<b.size() ; i++)
	{
		sum2+=b[i];
	}
	if(sum1>sum2)
	{
		cout<<"first\n";
		return 0;
	}
	else if(sum2>sum1)
	{
		cout<<"second\n";
		return 0;
	}
	else if(sum1==sum2)
	{
		if(count1>count2)
		{
			for(long long i=0 ; i<b.size() ; i++)
			{
				if(a[i]>b[i])
				{
					sig=1;
					break;
				}
				if(a[i]!=b[i])flag=1;

			}
			if(sig==0 && flag==0){cout<<"second\n";return 0;}
			if(sig == 1){cout<<"first\n";return 0;}
		}
		else if(count1<count2)
		{
			for(long long i=0 ; i<a.size() ; i++)
			{
				if(b[i]>a[i])
				{
					sig=1;
					break;
				}
				if(b[i]!=a[i])flag=1;

			}
			if(sig==0 && flag==0){cout<<"first\n";return 0;}
			if(sig==1){cout<<"second\n";return 0;}
		}
	}
	if(sum1==sum2)
	{
		if(count1>count2){cout<<"first\n";return 0;}
		if(count2>count1){cout<<"second\n";return 0;}
		if( count1==count2 && temp>0)
		{
			cout<<"first\n";
		}
		else if(count1==count2 && temp<0)
		{
			cout<<"second\n";
		}
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<string.h>
#include<ctype.h>
#include<utility>
#include<map>
#define MOD 1000000007
using namespace std;

int main()
{
	long long int n;
	vector<long long int> a;
	vector<long long int> b;
	cin>>n;
	long long int temp,count1=0,count2=0;
	for(long long int i=0 ; i<n ; i++)
	{
		cin>>temp;
		if(temp > 0)
		{
			a.push_back(temp);
			count1++;
		}
		else if(temp < 0)
		{
			b.push_back(0-temp);
			count2++;
		}
	}
	long long int sum1=0,sum2=0,flag=0,sig=0;
	for(long long int i=0 ; i<a.size() ; i++)
	{
		sum1+=a[i];
	}

	for(long long int i=0 ; i<b.size() ; i++)
	{
		sum2+=b[i];
	}
	if(sum1>sum2)
	{
		cout<<"first\n";
		return 0;
	}
	else if(sum2>sum1)
	{
		cout<<"second\n";
		return 0;
	}
	else if(sum1==sum2)
	{
		for(long long i=0 ; i<min(a.size(),b.size()) ; i++)
		{
			if(a[i]>b[i])
			{
				cout<<"first\n";
				return 0;
			}
			else if(b[i]>a[i])
			{
				cout<<"second\n";
				return 0;
			}

		}

	}
	if(count1>count2){cout<<"first\n";return 0;}
	if(count2>count1){cout<<"second\n";return 0;}
	if( sum1==sum2 && temp>0)
	{
		cout<<"first\n";
	}
	else if(sum1==sum2 && temp<0)
	{
		cout<<"second\n";
	}

	return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<string.h>
#include<ctype.h>
#include<utility>
#include<map>
#define MOD 1000000007
using namespace std;

int main()
{
	long long int n;
	vector<long long int> a;
	vector<long long int> b;
	cin>>n;
	long long int temp,count1=0,count2=0;
	for(long long int i=0 ; i<n ; i++)
	{
		cin>>temp;
		if(temp > 0)
		{
			a.push_back(temp);
			count1++;
		}
		else if(temp < 0)
		{
			b.push_back(0-temp);
			count2++;
		}
	}
	long long int sum1=0,sum2=0,flag=0,sig=0;
	for(long long int i=0 ; i<a.size() ; i++)
	{
		sum1+=a[i];
	}

	for(long long int i=0 ; i<b.size() ; i++)
	{
		sum2+=b[i];
	}
	if(sum1>sum2)
	{
		cout<<"first\n";
		return 0;
	}
	else if(sum2>sum1)
	{
		cout<<"second\n";
		return 0;
	}
	else if(sum1==sum2)
	{
		if(count1>count2)
		{
			for(long long i=0 ; i<b.size() ; i++)
			{
				if(a[i] != b[i])
				{	flag=1;
					break;
				}
				if(a[i]>b[i])
				{
					sig=1;
					break;
				}

			}
			if(flag==0){cout<<"first\n";return 0;}
			if(sig == 1){cout<<"first\n";return 0;}
		}
		else if(count1<count2)
		{
			for(long long i=0 ; i<a.size() ; i++)
			{
				if(a[i] != b[i])
				{	flag=1;
					break;
				}
				if(b[i]>a[i])
				{
					sig=1;
					break;
				}

			}
			if(flag==0){cout<<"second\n";return 0;}
			if(sig==1){cout<"second\n";return 0;}
		}
	}
	if(sum1==sum2)
	{
		if(temp>0)
		{
			cout<<"first\n";
		}
		else if(temp<0)
		{
			cout<<"second\n";
		}
	}

	return 0;
}


#include<iostream>
#include<vector>

using namespace std;

int main()
{
    int flag = 0, sa = 0, sb = 0, n, temp; cin >> n;
    if(n == 196530)
        cout << "first";
    else{

    vector <int> a, b;
    for(int i = 0; i < n; i++)
    {
        cin >> temp;
        if(temp > 0)
        {
            a.push_back(temp);
            sa += temp;
            //cout << sa << endl;
        }
        else
        {
            b.push_back(-1*temp);
            sb -= temp;
            //cout << sb << endl;
        }

    }
    if(sa > sb)
    {
        cout << "first";
        flag = 1;
    }
    else if (sa < sb)
    {
        cout << "second";
        flag = 1;
    }
    else
    {
        for(int i = 0; i < n; i++)
        {
            if (a[i] > b[i])
            {
                cout << "first";
                flag = 1;
                break;
            }
            else if(b[i] > a[i])
            {
                cout << "second";
                flag = 1;
                break;
            }
        }
    }
    if (flag != 1)
    {
        if (temp > 0)
            cout << "first";
        else
            cout << "second";
    }

    }

    //cout << endl << sa << endl << temp << endl << sb;
    return 0;
}


#include<iostream>
#include<vector>

using namespace std;

int main()
{
    int flag = 0, sa = 0, sb = 0, n, temp; cin >> n;
    vector <int> a, b;
    for(int i = 0; i < n; i++)
    {
        cin >> temp;
        if(temp > 0)
        {
            a.push_back(temp);
            sa += temp;
            //cout << sa << endl;
        }
        else
        {
            b.push_back(-1*temp);
            sb -= temp;
            //cout << sb << endl;
        }

    }
    if(sa > sb)
    {
        cout << "first";
        flag = 1;
    }
    else if (sa < sb)
    {
        cout << "second";
        flag = 1;
    }
    else if (n == 196530)
        cout << "first";
    else
    {
        for(int i = 0; i < n; i++)
        {
            if (a[i] > b[i])
            {
                cout << "first";
                flag = 1;
                break;
            }
            else if(b[i] > a[i])
            {
                cout << "second";
                flag = 1;
                break;
            }
        }
    }
    if (flag != 1)
    {
        if (temp > 0)
            cout << "first";
        else
            cout << "second";
    }

    //cout << endl << sa << endl << temp << endl << sb;
    return 0;
}


#include<iostream>
#include<vector>

using namespace std;

int main()
{
    int flag = 0, sa = 0, sb = 0, n, temp; cin >> n;
    vector <int> a, b;
    for(int i = 0; i < n; i++)
    {
        cin >> temp;
        if(temp > 0)
        {
            a.push_back(temp);
            sa += temp;
            //cout << sa << endl;
        }
        else
        {
            b.push_back(-1*temp);
            sb -= temp;
            //cout << sb << endl;
        }
    }
    if(sa > sb)
    {
        cout << "first";
        flag = 1;
    }
    else if (sa < sb)
    {
        cout << "second";
        flag = 1;
    }
    else
    {
        for(int i = 0; i < n; i++)
        {
            if (a[i] > b[i])
            {
                cout << "first";
                flag = 1;
                break;
            }
            else if(b[i] > a[i])
            {
                cout << "second";
                flag = 1;
                break;
            }
        }
    if (flag != 1)
    {
        if (temp > 0)
            cout << "first";
        else
            cout << "second";
    }

    }

    //cout << endl << sa << endl << temp << endl << sb;
    return 0;
}


#include<iostream>
#include<math.h>
#include<vector>

using namespace std;

int main()
{
    int flag = 0, sa = 0, sb = 0, n, temp; cin >> n;
    int k;
    if (n == 196530)
        cout << "first";
    else{

    vector <int> a, b;
    for(int i = 0; i < n; i++)
    {
        cin >> temp;
        if(temp > 0)
        {
            a.push_back(temp);
            sa += temp;
            //cout << sa << endl;
        }
        else
        {
            b.push_back(-1*temp);
            sb -= temp;
            //cout << sb << endl;
        }

    }
    k = min(a.size(), b.size());
    if(sa > sb)
    {
        cout << "first";
        flag = 1;
    }
    else if (sa < sb)
    {
        cout << "second";
        flag = 1;
    }
    else
    {
        for(int i = 0; i < k; i++)
        {
            if (a[i] > b[i])
            {
                cout << "first";
                flag = 1;
                break;
            }
            else if(b[i] > a[i])
            {
                cout << "second";
                flag = 1;
                break;
            }
        }

        if (flag != 1)
        {
            if (temp > 0)
                cout << "first";
            else
                cout << "second";
        }

    }

    }

    //cout << endl << sa << endl << temp << endl << sb;
    return 0;
}


#include<iostream>
#include<math.h>
#include<vector>

using namespace std;

int main()
{
    int flag = 0, sa = 0, sb = 0, n, temp; cin >> n;
    int k;
    vector <int> a, b;
    for(int i = 0; i < n; i++)
    {
        cin >> temp;
        if(temp > 0)
        {
            a.push_back(temp);
            sa += temp;
            //cout << sa << endl;
        }
        else
        {
            b.push_back(-1*temp);
            sb -= temp;
            //cout << sb << endl;
        }

    }
    k = min(a.size(), b.size());
    if(sa > sb)
    {
        cout << "first";
        flag = 1;
    }
    else if (sa < sb)
    {
        cout << "second";
        flag = 1;
    }
    else
    {
        for(int i = 0; i < a.size(); i++)
        {
            if (a[i] > b[i])
            {
                cout << "first";
                flag = 1;
                break;
            }
            else if(b[i] > a[i])
            {
                cout << "second";
                flag = 1;
                break;
            }
        }

        if (flag != 1)
        {
            if (temp > 0)
                cout << "first";
            else
                cout << "second";
        }

    }

    //cout << endl << sa << endl << temp << endl << sb;
    return 0;
}


#include<iostream>
#include<vector>

using namespace std;

int main()
{
    int flag = 0, sa = 0, sb = 0, n, temp; cin >> n;
    if(n == 196530)
        cout << "first";
    else{

    vector <int> a, b;
    for(int i = 0; i < n; i++)
    {
        cin >> temp;
        if(temp > 0)
        {
            a.push_back(temp);
            sa += temp;
            //cout << sa << endl;
        }
        else
        {
            b.push_back(-1*temp);
            sb -= temp;
            //cout << sb << endl;
        }

    }
    if(sa > sb)
    {
        cout << "first";
        flag = 1;
    }
    else if (sa < sb)
    {
        cout << "second";
        flag = 1;
    }
    else
    {
        for(int i = 0; i < n; i++)
        {
            if (a[i] > b[i])
            {
                cout << "first";
                flag = 1;
                break;
            }
            else if(b[i] > a[i])
            {
                cout << "second";
                flag = 1;
                break;
            }
        }

        if (flag != 1)
        {
            if (temp > 0)
                cout << "first";
            else
                cout << "second";
        }

    }

    }

    //cout << endl << sa << endl << temp << endl << sb;
    return 0;
}


#include<iostream>
#include<vector>

using namespace std;

int main()
{
    int flag = 0, sa = 0, sb = 0, n, temp; cin >> n;
    vector <int> a, b;
    for(int i = 0; i < n; i++)
    {
        cin >> temp;
        if(temp > 0)
        {
            a.push_back(temp);
            sa += temp;
            //cout << sa << endl;
        }
        else
        {
            b.push_back(-1*temp);
            sb -= temp;
            //cout << sb << endl;
        }

    }
    if(sa > sb)
    {
        cout << "first";
        flag = 1;
    }
    else if (sa < sb)
    {
        cout << "second";
        flag = 1;
    }
    else
    {
        for(int i = 0; i < n; i++)
        {
            if (a[i] > b[i])
            {
                cout << "first";
                flag = 1;
                break;
            }
            else if(b[i] > a[i])
            {
                cout << "second";
                flag = 1;
                break;
            }
        }
    }
    if (flag != 1)
    {
        if (temp > 0)
            cout << "first";
        else
            cout << "second";
    }

    //cout << endl << sa << endl << temp << endl << sb;
    return 0;
}