# 数据范围

y 坐标小于等于 300，x 坐标小于等于 3000，每一行的点数小于等于 1300.

# 代码

#include<bits/stdc++.h>
using namespace std;
#define RI register int
typedef double db;
const int N=1305;
const db inf=1e16;
int n[3];db y[3],ans;
db x[3][N],g0[N][N],g2[N][N],M[N][N],f[N];

db dis(db X1,db Y1,db X2,db Y2)
{return sqrt((X1-X2)*(X1-X2)+(Y1-Y2)*(Y1-Y2));}
db walk(int i,int j,int a,int b,int c,int d) {
db re=dis(x[1][i],y[1],x[a][b],y[a]);
re+=dis(x[c][d],y[c],x[1][j],y[1]);
re-=dis(x[a][b],y[a],x[c][d],y[c]);
return re;
}

void work1() {
for(RI i=n[1];i>=1;--i) {
for(RI j=i;j<=n[1];++j) {
if(i==j) {
g0[i][j-1]=1,g0[i+1][j]=n[0]-1;
g2[i][j-1]=1,g2[i+1][j]=n[2]-1;
}
db mxx=inf;
for(RI k=g0[i][j-1];k<=g0[i+1][j];++k) {
db kl=walk(i,j,0,k,0,k+1);
if(kl<mxx) mxx=kl,g0[i][j]=k;
}
M[i][j]=mxx,mxx=inf;
for(RI k=g2[i][j-1];k<=g2[i+1][j];++k) {
db kl=walk(i,j,2,k,2,k+1);
if(kl<mxx) mxx=kl,g2[i][j]=k;
}
if(mxx<M[i][j]) M[i][j]=mxx;
M[i][j]+=x[1][j]-x[1][i];
}
}
}
void work2() {
for(RI i=1;i<=n[1];++i) {
db L=min(walk(1,i,0,1,2,1),walk(1,i,2,1,0,1));
f[i]=L+x[1][i]-x[1][1];
for(int j=1;j<=i;++j) f[i]=min(f[i],f[j-1]+M[j][i]);
}
ans=f[n[1]];
for(RI i=n[1]-1;i>=1;--i) {
db R=min(walk(i+1,n[1],0,n[0],2,n[2]),walk(i+1,n[1],2,n[2],0,n[0]));
ans=min(ans,f[i]+R+x[1][n[1]]-x[1][i+1]);
}
ans+=x[0][n[0]]-x[0][1]+x[2][n[2]]-x[2][1];
ans+=dis(x[0][1],y[0],x[2][1],y[2]);
ans+=dis(x[0][n[0]],y[0],x[2][n[2]],y[2]);
}
int main()
{
freopen("dna.in","r",stdin);
freopen("dna.out","w",stdout);
scanf("%d%d%d",&n[0],&n[1],&n[2]);
scanf("%lf%lf%lf",&y[0],&y[1],&y[2]);
for(RI i=0;i<=2;++i)
for(RI j=1;j<=n[i];++j) scanf("%lf",&x[i][j]);
work1(),work2();
printf("%.2lf\n",ans);
return 0;
}