#include <cstdio>usingnamespacestd;
inta, b, c;
boolinput();
voidsolve();
intmain()
{
#ifndef ONLINE_JUDGEfreopen("d:\\OJ\\uva_in.txt", "r", stdin);
#endifintn;
scanf("%d", &n);
while (n--) {
input();
solve();
}
return0;
}
boolinput()
{
scanf("%d%d%d", &a, &b, &c);
returntrue;
}
voidsolve()
{
boolfound=false;
intx, y, z;
for (x=-22; x<=22&&!found; x++) {
if (x*x<=c) {
for (y=-100; y<=100&&!found; y++) {
if (y!=x&&x*x+y*y<=c) {
for (z=-100; z<=100&&!found; z++) {
if (z!=x&&z!=y&&x+y+z==a&&x*y*z==b&&x*x+y*y+z*z==c) {
printf("%d %d %d\n", x, y, z);
found=true;
}
}
}
}
}
}
if (!found) {
printf("No solution.\n");
}
}