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