use Math::BigInt;

$x = $*IN;
while(1){
	$x=$x-1;
	if($x==0)break;
    my $input = $*IN;
	my $x = Math::BigInt->new($input);
	print $x->bsqrt(); 
    }