#include <bits/stdc++.h>

using namespace std;

#define int long long
#define all(v) begin(v), end(v)
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for(int i = (int)(s); i < (int)(n); i++)
#define min(...) min({__VA_ARGS__})
#define max(...) max({__VA_ARGS__})

template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>b)a=b;}
template<class T1, class T2> void chmax(T1 &a, T2 b){if(a<b)a=b;}

using pint = pair<int, int>;
using tint = tuple<int, int, int>;
using vint = vector<int>;

const int inf = 1LL << 55;
const int mod = 1e9 + 7;

struct Point {
  double x, y;
  Point(double x = 0, double y = 0):x(x), y(y){}
};

int n;
Point seg[2][14];
double dp[2][14][1<<14];

double sq(double x) {
  return x*x;
}

double dist(Point p, Point q) {
  return sqrt(sq(p.x-q.x)+sq(p.y-q.y));
}

double solve(int idx, int ep, int bit) {
  if(bit == (1<<n)-1) return 0.0;
  double &res = dp[ep][idx][bit];
  if(res != -1.0) return res;
  res = 1e9;
  rep(i, n) {
    if((bit>>i)&1) continue;
    rep(j, 2) res = min(res, solve(i, j, bit|1<<i) + dist(seg[ep][idx], seg[!j][i]));
  }
  return res;
}

signed main()
{
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(12);

  for(int t = 1; cin >> n, n; t++) {
    double sum = 0.0;
    rep(i, n) {
      rep(j, 2) cin >> seg[j][i].x >> seg[j][i].y;
      sum += dist(seg[0][i], seg[1][i]);
    }

    double ans = 1e9;
    rep(i, 2) rep(j, 14) rep(k, 1<<14) dp[i][j][k] = -1.0;
    rep(i, n) {
      ans = min(ans, solve(i, 0, 1<<i), solve(i, 1, 1<<i));
    }
    cout << "Case " << t << ": " << ans+sum << endl;
  }

  return 0;
}