#include<stdio.h>
int main() {
    int n;
    double x1, y1, x2, y2;
    double dist;
    
    if(scanf("%d", &n) !=1){
        printf("Invalid input");
        return 0;
    }
    for(int i=0; i<n; i++){
        if(scanf("%lf %lf %lf %lf",&x1,&y1, &x2, &y2)!=4){
        printf("Invalid input");
        return 0;
        }
        dist = sqrt((x2 - x1)*(x2 - x1)+(y2-y1)*(y2-y1));
        printf("%.2lf\n", dist);
    }
}