#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 1000000000000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


enum Type{
	A,
	C,
	B,
};

int N,POW[4];
int table[105],COUNT[3][105];
double dp[101][101][101][3][3];
Type type_array[3] = {A,C,B};


double recursive(int ab,int ac,int bc,Type joker,Type turn){

	if(dp[ab][ac][bc][joker][turn] >= 0){

		return dp[ab][ac][bc][joker][turn];
	}

	int num_A = ab+ac;
	int num_B = ab+bc;
	int num_C = ac+bc;

	switch(joker){
	case A:
		num_A++;
		break;
	case B:
		num_B++;
		break;
	case C:
		num_C++;
		break;
	}

	if(turn == A && num_A == 0){

		return dp[ab][ac][bc][joker][turn] = recursive(ab,ac,bc,joker,C);

	}else if(turn == C && num_C == 0){

		return dp[ab][ac][bc][joker][turn] = 1.0;

	}else if(turn == B && num_B == 0){

		return dp[ab][ac][bc][joker][turn] = recursive(ab,ac,bc,joker,A);
	}

	if(num_A+num_B+num_C == 1){

		if(num_C == 1){

			return dp[ab][ac][bc][joker][turn] = 0;
		}else{

			return dp[ab][ac][bc][joker][turn] = 1.0;
		}
	}

	double ret = 0;

	if(turn == A){

		if(num_B == 0){

			if(num_C == 1){ //C,非負け

				return dp[ab][ac][bc][joker][turn] = 1.0;

			}else{ //2枚以上あるなら、非jokerは少なくとも1枚ある

				if(ac > 0){

					return dp[ab][ac][bc][joker][turn] = recursive(ab,ac-1,bc,joker,C);

				}else{ //bc > 0

					//bが0枚なのであり得ない
				}
			}

		}else{ //num_B > 0

			if(ab > 0){

				ret += recursive(ab-1,ac,bc,joker,C)*((double)ab/(double)num_B);
			}
			if(bc > 0){

				ret += recursive(ab,ac+1,bc-1,joker,C)*((double)bc/(double)num_B);
			}
			if(joker == B){

				ret += recursive(ab,ac,bc,A,C)*(1.0/(double)num_B);
			}
		}

	}else if(turn == B){

		if(num_C == 0){//C:非負け

			return dp[ab][ac][bc][joker][turn] = 1.0;

		}else{ //num_C > 0

			if(num_C == 1){ //C,非負け

				return dp[ab][ac][bc][joker][turn] = 1.0;

			}else{ //2枚以上あるなら、非jokerは少なくとも1枚ある

				if(bc > 0){

					return dp[ab][ac][bc][joker][turn] = recursive(ab,ac,bc-1,joker,A);

				}else{ //ac > 0

					return dp[ab][ac][bc][joker][turn] = recursive(ab+1,ac-1,bc,joker,A);
				}
			}
		}

	}else{ //turn == C

		if(num_A == 0){ //Bから引く

			if(ab > 0){

				//Aが0なのであり得ない
			}
			if(bc > 0){

				ret += recursive(ab,ac,bc-1,joker,B)*((double)bc/(double)num_B);
			}
			if(joker == B){

				ret += recursive(ab,ac,bc,C,B)*(1.0/(double)num_B);
			}

		}else{ //num_A > 0

			if(ab > 0){

				ret += recursive(ab-1,ac,bc+1,joker,B)*((double)ab/(double)num_A);
			}
			if(ac > 0){

				ret += recursive(ab,ac-1,bc,joker,B)*((double)ac/(double)num_A);
			}
			if(joker == A){

				ret += recursive(ab,ac,bc,C,B)*(1.0/(double)num_A);
			}
		}
	}

	return dp[ab][ac][bc][joker][turn] = ret;
}

int main(){

	POW[0] = 1;
	for(int i = 1; i < 4; i++){

		POW[i] = POW[i-1]*2;
	}

	scanf("%d",&N);

	for(int i = 1; i <= N; i++){
		for(int k = 0; k < 3; k++){
			COUNT[k][i] = 0;
		}
	}

	int num,tmp;
	Type joker = A;

	for(int i = 0; i < 3; i++){
		scanf("%d",&num);
		for(int k = 0; k < num; k++){
			scanf("%d",&tmp);

			COUNT[i][tmp]++;

			if(tmp == 0){

				joker = type_array[i];
			}
		}
	}

	for(int i = 0; i < 3; i++){
		for(int k = 1; k <= N; k++){
			if(COUNT[i][k]%2 == 1){

				table[k] += POW[i];
			}
		}
	}



	int ab = 0,ac = 0,bc = 0;
	for(int i = 1; i <= N; i++){
		if(table[i] == 0)continue;

		switch(table[i]){
		case 3:
			ac++;
			break;
		case 5:
			ab++;
			break;
		case 6:
			bc++;
			break;
		}
	}

	for(int i = 0; i <= N; i++){
		for(int k = 0; k <= N; k++){
			for(int p = 0; p <= N; p++){
				for(int a = 0; a < 3; a++){
					for(int b = 0; b < 3; b++){

						dp[i][k][p][a][b] = -1;
					}
				}
			}
		}
	}

	printf("%.10lf\n",recursive(ab,ac,bc,joker,A));

	return 0;
}



Measured memory_bytes: 75660