#include<stdio.h>
#include<math.h>
int main() {
    int n;
    double x1,y1,x2,y2;
    if(scanf("%d",&n)!=1||n<-10||n>10)puts("Invalid input");
    else while(n--){if(scanf("%1f%1f%1f%1f",&x1,&y1,&x2,&y2)!=4)puts ("Invalid input"),0;
    else printf("%.2f\n",hypot(x2-x1,y2-y1));}
    return 0;
    }