Greg's Workout

Description

Greg is a beginner bodybuilder. Today the gym coach gave him the training plan. All it had was n integers a1, a2, ..., an. These numbers mean that Greg needs to do exactly n exercises today. Besides, Greg should repeat the i-th in order exercise ai times.

Greg now only does three types of exercises: "chest" exercises, "biceps" exercises and "back" exercises. Besides, his training is cyclic, that is, the first exercise he does is a "chest" one, the second one is "biceps", the third one is "back", the fourth one is "chest", the fifth one is "biceps", and so on to the n-th exercise.

Now Greg wonders, which muscle will get the most exercise during his training. We know that the exercise Greg repeats the maximum number of times, trains the corresponding muscle the most. Help Greg, determine which muscle will get the most training.

Input

The first line contains integer n(1 ≤ n ≤ 20). The second line contains n integers a1, a2, ..., an(1 ≤ ai ≤ 25) — the number of times Greg repeats the exercises.

Output

Print word "chest" (without the quotes), if the chest gets the most exercise, "biceps" (without the quotes), if the biceps gets the most exercise and print "back" (without the quotes) if the back gets the most exercise.

It is guaranteed that the input is such that the answer to the problem is unambiguous.

Sample Input

Input
2
2 8
Output
biceps
Input
3
5 1 10
Output
back
Input
7
3 3 2 7 9 6 8
Output
chest

Hint

In the first sample Greg does 2 chest, 8 biceps and zero back exercises, so the biceps gets the most exercises.

In the second sample Greg does 5 chest, 1 biceps and 10 back exercises, so the back gets the most exercises.

In the third sample Greg does 18 chest, 12 biceps and 8 back exercises, so the chest gets the most exercise.



#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;

int main(){
    int n,chest,biceps,back,i,j,t;
    while(cin>>n){
        chest=0;
        biceps=0;
        back=0;
        for(i=0,j=1;i<n;i++,j++){
            cin>>t;
            if(j==1){
                chest+=t;
            }
            else if(j==2){
                biceps+=t;
            }
            else if(j==3){
                back+=t;
                j=0;
            }
        }
        if(chest>biceps&&chest>back){
            cout<<"chest"<<endl;
        }
        else if(biceps>chest&&biceps>back){
            cout<<"biceps"<<endl;
        }
        else{
            cout<<"back"<<endl;
        }
    }
    return 0;
}


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值