import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
for(int i=0;i<n;i++)
{
Point p=new Line(new Point(sc.nextInt(),sc.nextInt()),new Point(sc.nextInt(),sc.nextInt()));
System.out.println(p.toString());
Line s=(Line) p;//转型;
double a=s.getLength();//赋值;
System.out.printf("此线段的长度为:%.1f\n",a);
}
}
}
class Point {
private int x, y;// x,y为点的坐标
//求两点之间的距离
public double distance(Point p1) {
return Math.sqrt((p1.x -this.x)*(p1.x -this.x)+(p1.y-this.y)*(p1.y-this.y));
}
public Point(int x, int y) {
super();
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public Point() {
super();
x = y =0;
}
@Override
public String toString() {
return "Point [x=" + x + ", y=" + y + "]";
}
}
class Line extends Point
{
Point p1,p2;
public Line(Point p1,Point p2)
{
this.p1=p1;
this.p2=p2;
}
public Point getp1()
{
return p1;
}
public Point getp2()
{
return p2;
}
public void setp1(Point p1)
{
this.p1=p1;
}
public void setp2(Point p2)
{
this.p2=p2;
}
public double getLength()
{
return Math.sqrt((p1.getX()-p2.getX())*(p1.getX()-p2.getX())+(p1.getY()-p2.getY())*(p1.getY()-p2.getY()));
}
public String toString()
{
return "Line[p1="+p1.toString()+",p2="+p2.toString()+"]";
}
}