// Slower C++ solution:
#include <iostream>

#include <sstream>

#include <string>

#include <algorithm>

#include <vector>

#include <stack>

#include <queue>

#include <set>

#include <map>

#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <cmath>

#include <cassert>



using namespace std;



#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)

#define REP(i,n) FOR(i,0,n)

#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)



template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cout<<*i<<" "; cout<<endl; }

inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }



typedef long long ll;

const int INF = 100000000;

const double EPS = 1e-8;

const int MOD = 1000000007;

int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};

int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

double dist(double x, double y){

  return sqrt(x * x + y * y);

}



int main(){

  int N;

  int CASE = 1;

  while(cin>>N && N){

    printf("Case %d: ", CASE++);

    double x[14][2], y[14][2];

    double d[14];

    REP(i, N){

      REP(j, 2) cin>>x[i][j]>>y[i][j];

      d[i] = dist(x[i][0] - x[i][1] , y[i][0] - y[i][1]);

    }

    double dp[1<<14][14][2];

    REP(i, 1<<14)REP(j, 14)REP(k, 2) dp[i][j][k] = INF;

    REP(i, N)REP(k, 2) dp[1<<i][i][k] = d[i];

    REP(S, 1<<N){

      REP(from, 2 * N){

        int f_i = from / 2;

        int f_j = from % 2;

        REP(to, 2 * N){

          int t_i = to / 2;

          int t_j = to % 2;

          if(S & (1<<t_i)) continue;

          dp[S | (1<<t_i)][t_i][t_j] = min(dp[S | (1<<t_i)][t_i][t_j],

              dp[S][f_i][f_j] + dist(x[f_i][f_j] - x[t_i][(t_j + 1) % 2], y[f_i][f_j] - y[t_i][(t_j + 1) % 2]) + d[t_i]);

        }

      }

    }

    double ans = 1e16;

    REP(i, N)REP(j, 2) ans = min(ans, dp[(1<<N) - 1][i][j]);

    

    printf("%.5f\n", ans);

  }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 7.780574074045664x):
#include <iostream>

#include <sstream>

#include <string>

#include <algorithm>

#include <vector>

#include <stack>

#include <queue>

#include <set>

#include <map>

#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <cmath>

#include <cassert>



using namespace std;



#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)

#define REP(i,n) FOR(i,0,n)

#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)



template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cout<<*i<<" "; cout<<endl; }

inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }



typedef long long ll;

const int INF = 100000000;

const double EPS = 1e-8;

const int MOD = 1000000007;

int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};

int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

double dist(double x, double y){

  return sqrt(x * x + y * y);

}



int main(){

  int N;

  int CASE = 1;

  while(cin>>N && N){

    printf("Case %d: ", CASE++);

    double x[14][2], y[14][2];

    double d[14];

    double ds[14][14][2][2];

    REP(i, N){

      REP(j, 2) cin>>x[i][j]>>y[i][j];

      d[i] = dist(x[i][0] - x[i][1] , y[i][0] - y[i][1]);

    }

    REP(i, N)FOR(j, i + 1, N){

      REP(k, 2)REP(l, 2){

        ds[i][j][k][l] = ds[j][i][l][k] = dist(x[i][k] - x[j][l], y[i][k] - y[j][l]);

      }

    }

    double dp[1<<14][14][2];

    REP(i, 1<<N)REP(j, N)REP(k, 2) dp[i][j][k] = INF;

    REP(i, N)REP(k, 2) dp[1<<i][i][k] = d[i];

    REP(S, 1<<N){

      REP(from, 2 * N){

        int f_i = from / 2;

        int f_j = from % 2;

        if(!(S & 1 << f_i)){

          from++;

          continue;

        }

        REP(to, 2 * N){

          int t_i = to / 2;

          int t_j = to % 2;

          if(S & 1<<t_i){

            to++;

            continue;

          }

          dp[S | (1<<t_i)][t_i][t_j] = min(dp[S | (1<<t_i)][t_i][t_j],

              //dp[S][f_i][f_j] + dist(x[f_i][f_j] - x[t_i][(t_j + 1) % 2], y[f_i][f_j] - y[t_i][(t_j + 1) % 2]) + d[t_i]);

              dp[S][f_i][f_j] + ds[f_i][t_i][f_j][(t_j + 1) % 2] + d[t_i]);

        }

      }

    }

    double ans = 1e16;

    REP(i, N)REP(j, 2) ans = min(ans, dp[(1<<N) - 1][i][j]);

    

    printf("%.5f\n", ans);

  }

  return 0;

}