#include <stdio.h>
#include <math.h>

int main()
{
  int setcount;
  float x1, y1, x2, y2, x3, y3;
  float nx1, ny1, nx2, ny2;
  float nr1, nr2;
  float xp, yp, r;
  int tx, ty, tr, rem;
  int i;

  scanf("%d", &setcount);
  for(i=0; i<setcount; i++){

    xp=nr1+x1; yp=nr2+y1;
    r=(float)sqrt((double)(nr1^2+nr2^2));
    tx=xp*10000; ty=yp*10000; tr=r*10000;
    if((rem=tx%10)<5) tx-=rem;
    else tx+=10-rem;
    if((rem=ty%10)<5) ty-=rem;
    else ty+=10-rem;
    if((rem=tr%10)<5) tr-=rem;
    else tr+=10-rem;
    xp=(float)tx*0.0001f; yp=(float)ty*0.0001f; r=(float)tr*0.0001f;

    printf("%.3f %.3f %.3f\n", xp, yp, r);
  }

  return 0;
}