// Arup Guha
// 7/17/2026
// Solution to UCF 1995 HS Contest Problem: Dueling Goats

import java.util.*;

public class goats {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		int nC = stdin.nextInt();
		
		// Process cases.
		for (int loop=1; loop<=nC; loop++) {
		
			// Get both circles.
			circle[] both = new circle[2];
			for (int i=0; i<2; i++) {
				double x = stdin.nextDouble();
				double y = stdin.nextDouble();
				double r = stdin.nextDouble();
				both[i] = new circle(x, y, r);
			}
			
			// Case header.
			System.out.println("Set #"+loop);
			
			// Easiest case.
			if (!both[0].hasIntersection(both[1]))
				System.out.println("  The goats can't kick each other.");
			
			// Tangent, print out one point.
			else if (both[0].hasOneIntersection(both[1])) {
				circle res = both[0].getOneIntersection(both[1]);
				System.out.printf("  The goats kick each other at %.3f %.3f\n", res.x, res.y);
			}
			
			// "Regular" case
			else {
				circle[] res = both[0].getTwoIntersections(both[1]);
				for (int i=0; i<2; i++)
					System.out.printf("  The goats kick each other at %.3f %.3f\n", res[i].x, res[i].y);
			}
			
			// After each case.
			System.out.println();
		
		} // end case.
	}
}

class circle {

	/*** This is specified in the problem and you have to use it! ***/
	final public static double EPS = 1e-4;
	
	public double x;
	public double y;
	public double r;
	
	public circle(double myx, double myy, double myr) {
		x = myx;
		y = myy;
		r = myr;
	}
	
	// Returns the distance between the centers.
	public double distCenters(circle other) {
		return Math.sqrt( (x-other.x)*(x-other.x) + (y-other.y)*(y-other.y) );
	}
	
	// Returns true iff there's any intersection. You have to check two things:
	// the centers aren't too far apart and they can't be too close...
	public boolean hasIntersection(circle other) {
		return distCenters(other) < r + other.r + EPS &&
		       Math.max(r, other.r) - Math.min(r, other.r) < distCenters(other) + EPS;
	}
	
	// Returns true iff this and other are tangent. It checks for two cases:
	// external and internal tangency.
	public boolean hasOneIntersection(circle other) {
		return Math.abs(distCenters(other)-r-other.r) < EPS ||
			   Math.abs(Math.abs(r-other.r) - distCenters(other)) < EPS;
	}
	
	// Pre-condition: this and other are tangent to each other.
	// Post-condition: returns point of intersection as a circle with r=0.
	public circle getOneIntersection(circle other) {

		// Case with circles outside of each other.
		if (Math.abs(distCenters(other)-r-other.r) < EPS) {
			// Get vectors from center to center.
			double dx = other.x - x;
			double dy = other.y - y;
			
			// This is the ratio we travel on the line segment.
			double ratio = r/(r+other.r);
			
			// Here is the point of intersection.
			return new circle(x + ratio*dx, y + ratio*dy, 0);
		}
		
		// Case with smaller circle inside larger and tangent.
		else {
			
			// Probably a more elegant way, but I just want to finish this problem.
			
			// this is bigger.
			if (r>other.r) {
				double dx = other.x - x;
				double dy = other.y - y;
				double ratio = r/(r-other.r);
				return new circle(x + ratio*dx, y + ratio*dy, 0);
			}
			
			// other is bigger.
			else {
				double dx = x - other.x;
				double dy = y - other.y;
				double ratio = other.r/(other.r-r);
				return new circle(other.x + ratio*dx, other.y + ratio*dy, 0);
			}
			
		}
	}
	
	// Pre-condition: this and other have two intersections.
	// Post-condition: returns both points of intersections as circles with r=0.
	public circle[] getTwoIntersections(circle other) {
		
		// This is the third side of the triangle r, other.r, d.
		double d = distCenters(other);
		
		// This is the angle between the line segment between centers and the line
		// segments to the intersection point.
		double theta = Math.acos( (r*r+d*d-other.r*other.r)/(2*r*d) );
		
		// Direction (as an angle -pi to pi) from this center to other center.
		double alpha = Math.atan2(other.y-y, other.x-x);
		
		// Angles from center of this circle to the two intersection points.
		double[] angs = new double[2];
		angs[0] = alpha+theta;
		angs[1] = alpha-theta;
		
		// Form the points by moving from the center a distance of r in the 
		// direction of the two angles we already calculated.
		circle[] res = new circle[2];
		for (int i=0; i<2; i++)
			res[i] = new circle(x+Math.cos(angs[i])*r,y+Math.sin(angs[i])*r,0);
		
		// Ta da!
		return res;
	}
}