#include <cstdio>
#include <cmath>

int main(){
    int n;
    double x1, y1, x2, y2;
    
    if (scanf("%d", &n) != 1) return 
printf("Invaild input\n"), 0;

    while (n--) {
        if (scanf("%lf %lf %lf %lf",&x1, &y1, &x2, &y2) !=4) {
           printf("Invaild input\n");
           break;
        }
        printf("%2lf\n", hypot(x2 - x1,y2 - y1));
    }
        return 0;
    }