let data = '';
process.stdin.on('data', c => data += c);

function* nextLine() {
	let lines = data.trim().split(/\n/g);
	for(let l of lines){
		yield l.trim();
	}
}

let nl = nextLine();

nl.elem = function(funParse) {
		return funParse(this.next().value);
	};

nl.array = function(funParse) {
		return this.next().value.split(/\s/g).map(funParse||(x => x));
	};

nl.num = function() {
		return nl.elem(Number);
	};

nl.nums = function() {
		return nl.array(Number);
	};

nl.line = function() {
		return this.next().value;
	};

const sol = () => {
	//your code this
	let t = nl.nums();
	let ans = [];
	for(let i = 0; i < t; i++){
		let n = nl.num();
		let x = Math.trunc(Math.sqrt(n)) + Math.trunc(Math.cbrt(n));
		for(let j = 1; j <= Math.cbrt(n); j++){
			let c = j ** 3;
			if (Math.sqrt(c) % 1 === 0) x--;
		}
		ans.push(x);
	}
	console.log(ans.join('\n'));
};

process.stdin.on('end', sol);


const input = [];

const RL = require('readline').createInterface({
   input : process.stdin,
   output : process.stdout
});

RL.on('line', (line) => {
    input.push(line);
});

function fact(num)
{
    if(num === 0)
        return 1;
    return num * fact(num-1);
}

RL.on('close', () => {
    const n = parseInt(input[0], 10);
    const data = []; input[1].split(' ').forEach( i => data.push(parseInt(i, 10)) );

    let b = 0; let g = 0; let t = 0;;
    for(let i = 0; i < n; i += 1){
        if(i % 3 === 0)
            b += data[i];
        else if(i % 3 === 1)
            g += data[i];
        else if(i % 3 === 2)
            t += data[i];
    }

    global.console.log( (b > t && b > g) ? 'chest' : (t > b && t > g) ? 'back' : 'biceps' );
});