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