import java.util.* ;
import java.lang.* ;
import java.io.* ;
public class node {
public int x;
public int y;
public node( int x, int y) {
this .x = x;
this .y = y;
}
}
class Main
{
const int inf = 10000000 ;
vector < node> cities;
int d [ 200 ] ;
void diikstra ( int n ) {
d[ 0 ] = 0 ;
for ( int i = 1 ; i < n; i++ ) {
d[ i] = inf;
}
{
priority_queue < pair < int , int> > q;
q.push ( { d[ 0 ] , 0 } ) ;
while ( ! q.empty ( ) ) {
int num_v = q.top ( ) .second ;
node cur = cities[ num_v] ;
int distv = - q.top ( ) .first ;
q.pop ( ) ;
for ( int i = 0 ; i < n; i++ ) {
int distance = max ( distv, ( cur.x - cities[ i] .x ) * ( cur.x - cities[ i] .x ) + ( cur.y - cities[ i] .y ) * ( cur.y - cities[ i] .y ) ) ;
if ( d[ i] > distance) {
d[ i] = distance;
q.push ( { - distance, i} ) ;
}
}
}
}
int main( ) {
cout.precision ( 3 ) ;
int q;
cin >> q;
for ( int w = 0 ; w < q; w++ ) {
int n;
cin >> n;
for ( int i = 0 ; i < n; i++ ) {
int a, b;
cin >> a >> b;
cities.push_back ( { a,b} ) ;
}
diikstra ( n) ;
for ( int i = 0 ; i < n; i++ ) {
cities.pop_back ( ) ;
}
cout << fixed << sqrt( d[ 1 ] ) << endl;
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpwdWJsaWMgY2xhc3Mgbm9kZSB7CiAgICBwdWJsaWMgaW50IHg7CiAgICBwdWJsaWMgaW50IHk7CiAgICBwdWJsaWMgbm9kZShpbnQgeCwgaW50IHkpIHsKICAgICAgICB0aGlzLnggPSB4OwogICAgICAgIHRoaXMueSA9IHk7CiAgICB9Cn0KY2xhc3MgTWFpbgp7Cgljb25zdCBpbnQgaW5mID0gMTAwMDAwMDA7Cgl2ZWN0b3IgPG5vZGU+IGNpdGllczsKCWludCBkIFsyMDBdOwoJdm9pZCBkaWlrc3RyYSAoIGludCBuICl7CiAgICBkWzBdID0gMDsKICAgIGZvciAoaW50IGkgPSAxOyBpIDwgbjsgaSsrKXsKICAgICAgICBkW2ldID0gaW5mOwogICAgfQoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CiAgICBwcmlvcml0eV9xdWV1ZSA8IHBhaXIgPGludCwgaW50PiA+IHE7CiAgICBxLnB1c2goe2RbMF0sIDB9KTsKICAgIHdoaWxlICghcS5lbXB0eSgpKSB7CiAgICAgICAgaW50IG51bV92ID0gcS50b3AoKS5zZWNvbmQ7CiAgICAgICAgbm9kZSBjdXIgPSBjaXRpZXNbbnVtX3ZdOwogICAgICAgIGludCBkaXN0diA9IC1xLnRvcCgpLmZpcnN0OwogICAgICAgIHEucG9wKCk7CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKICAgICAgICAgICAgIGludCBkaXN0YW5jZSA9IG1heCAoZGlzdHYsIChjdXIueCAtIGNpdGllc1tpXS54KSooY3VyLnggLSBjaXRpZXNbaV0ueCkrKGN1ci55IC0gY2l0aWVzW2ldLnkpKihjdXIueSAtIGNpdGllc1tpXS55KSk7CiAgICAgICAgICAgICAgICAgICAgIGlmKGRbaV0gPiBkaXN0YW5jZSl7CiAgICAgICAgICAgICAgICAgICAgICAgIGRbaV0gPSBkaXN0YW5jZTsKICAgICAgICAgICAgICAgICAgICAgICAgcS5wdXNoICh7LWRpc3RhbmNlLCBpfSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAgICAgfQp9CmludCBtYWluKCkgewogICAgY291dC5wcmVjaXNpb24oMyk7CiAgICBpbnQgcTsKICAgIGNpbiA+PiBxOwogICAgZm9yIChpbnQgdyA9IDA7IHcgPCBxOyB3KyspewogICAgICAgIGludCBuOwogICAgICAgIGNpbiA+PiBuOwogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKICAgICAgICAgICAgaW50IGEsIGI7CiAgICAgICAgICAgIGNpbiA+PiBhID4+IGI7CiAgICAgICAgICAgIGNpdGllcy5wdXNoX2JhY2soe2EsYn0pOwogICAgICAgIH0KICAgICAgICBkaWlrc3RyYSAobik7CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspewogICAgICAgICAgICBjaXRpZXMucG9wX2JhY2soKTsKICAgICAgICB9CiAgICAgICAgY291dCA8PCBmaXhlZCA8PCBzcXJ0KGRbMV0pIDw8ICBlbmRsOwoJfQp9