#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<long long> vll;
typedef pair<int,int> pint;
typedef pair<long long, long long> pll;

#define MP make_pair
#define PB push_back
#define ALL(s) (s).begin(),(s).end()
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P) 
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P) 
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P) 
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P) 
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s; }



inline double dis(double x1, double y1, double x2, double y2) {
    return sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) );
}

const double INF = 1<<29;
double dp[1<<15][20][3];

int main() {
    //freopen( "/Users/macuser/Dropbox/Contest/input.in", "r", stdin );
    double x[2][20], y[2][20];
    int it = 0;
    int n;
    while (cin >> n) {
        if (n == 0) break;
        
        ++it;
        for (int i = 0; i < n; ++i) {
            cin >> x[0][i] >> y[0][i] >> x[1][i] >> y[1][i];
        }
        
        for (int i = 0; i < (1<<15); ++i) for (int j = 0; j < 20; ++j) for (int k = 0; k < 3; ++k) dp[i][j][k] = INF;
        for (int i = 0; i < n; ++i) dp[(1<<i)][i][0] = dp[(1<<i)][i][1] = dis(x[0][i], y[0][i], x[1][i], y[1][i]);
        
        for (int bit = 0; bit < (1<<n); ++bit) {
            for (int i = 0; i < n; ++i) {
                //cout << bitset<4>(bit) << ", " << i << " : " << MP(dp[bit][i][0], dp[bit][i][1]) << endl;
                if ( !(bit & (1<<i)) ) continue;
                for (int j = 0; j < n; ++j) {
                    if (i == j) continue;
                    if (bit & (1<<j)) continue;
                    int nbit = bit | (1<<j);
                
                    for (int p = 0; p < 2; ++p) for (int q = 0; q < 2; ++q) {
                        chmin(dp[nbit][j][1-q], dp[bit][i][p] + dis(x[p][i], y[p][i], x[q][j], y[q][j]) 
                              + dis(x[0][j], y[0][j], x[1][j], y[1][j]));
                    }
                }
            }
        }
        
        double res = INF;
        for (int i = 0; i < n; ++i) chmin(res, dp[(1<<n)-1][i][0]), chmin(res, dp[(1<<n)-1][i][1]);
        
        cout << "Case " << it << ": ";
        cout << fixed << setprecision(9) << res << endl;
    }
    return 0;
}


Measured memory_bytes: 16664