#include <bits/stdc++.h>
using namespace std;
// #define int long long   // <-----!!!!!!!!!!!!!!!!!!!

#define rep(i,n) for (int i=0;i<(n);i++)
#define rep2(i,a,b) for (int i=(a);i<(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define printV(v) for(auto&& x : v){cout << x << " ";} cout << endl
#define printVV(vv) for(auto&& v : vv){for(auto&& x : v){cout << x << " ";}cout << endl;}
#define printP(p) cout << p.first << " " << p.second << endl
#define printVP(vp) for(auto&& p : vp) printP(p);

typedef long long ll;
typedef pair<int, int> Pii;
typedef tuple<int, int, int> TUPLE;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<Pii> vp;
const int inf = 1e9;
const int mod = 1e9 + 7;
template<typename T> using Graph = vector<vector<T>>;

enum { KOUSAKA, SONODA, MINAMI };

// A: KOUSAKA & SONODA
// B: KOUSAKA & MINAMI
// C: SONODA & MINAMI

// who_asked?????????????????????????????£???????????????
int numCard(int A, int B, int C, int who_joker, int who_asked) {
    switch (who_asked) {
        case KOUSAKA: {
            return A + B + (who_joker == KOUSAKA);
        }
        case SONODA: {
            return A + C + (who_joker == SONODA);
        }
        case MINAMI: {
            return B + C + (who_joker == MINAMI);
        }
    }
}

// who?????????????????£????????????????????°true?????????
bool exist(int A, int B, int C, int who_joker, int who_asked) {
    return numCard(A, B, C, who_joker, who_asked) > 0;
}

double dp[101][101][101][3][3];

// A: KOUSAKA & SONODA
// B: KOUSAKA & MINAMI
// C: SONODA & MINAMI

// ?????°??????????????????????¢?????????????
double dfs(int A, int B, int C, int who_joker, int who_turn) {
    if (A < 0 || B < 0 || C < 0) return 0;
    // cerr << A << " " << B << " " << C << " " << who_joker << " " << who_turn << endl;

    double& ret = dp[A][B][C][who_joker][who_turn];
    if (ret >= 0) return ret;

    int nxt_turn = (who_turn + 1) % 3;
    switch (who_turn) {
        case KOUSAKA: {
            if (!exist(A, B, C, who_joker, KOUSAKA)) {
                // ?????????????????????????????£????????? -> ?¬??????????
                return ret = dfs(A, B, C, who_joker, nxt_turn);
            }
            if (exist(A, B, C, who_joker, MINAMI)) {
                // ???????????????????????¨??? -> ????¢????
                double tmp = 0;
                int denom = numCard(A, B, C, who_joker, MINAMI); // ??????????????£??????????????????????????°
                tmp += dfs(A, B - 1, C, who_joker, nxt_turn) * B / denom;       // B ???????????£?????????
                tmp += dfs(A + 1, B, C - 1, who_joker, nxt_turn) * C / denom;   // C ??? A ????????????
                if (who_joker == MINAMI) {
                    tmp += dfs(A, B, C, KOUSAKA, nxt_turn) * 1 / denom;
                }
                return ret = tmp;
            } else if (exist(A, B, C, who_joker, SONODA)) {
                // ?????°????????????????????¨??? -> ??????????????????
                if (A > 0) {
                    // ??????????????????????????°???????????????
                    return ret = dfs(A - 1, B, C, who_joker, nxt_turn);
                } else if (C > 0) {
                    // ???????????????????????????joker??\??????????????????????????°???????????????
                    return ret = dfs(A, B + 1, C - 1, who_joker, nxt_turn);
                } else {
                    // ?????°?????????joker???????????£?????????????????°???????????????????????§?????? -> ?????°??????????????????
                    return 1;
                }
            } else {
                // ???????????????????????£??????????????¨??? -> ?????°???????????????????????£????????????
                return 1;
            }
            assert(false);
        }
        case SONODA: {
            if (!exist(A, B, C, who_joker, SONODA)) {
                // ?????°???????????????????????£????????????
                return 1;
            }
            if (exist(A, B, C, who_joker, KOUSAKA)) {
                // ??????????????????????????¨??? -> ????¢????
                double tmp = 0;
                int denom = numCard(A, B, C, who_joker, KOUSAKA); // ??????????????£??????????????????????????°
                tmp += dfs(A - 1, B, C, who_joker, nxt_turn) * A / denom;       // A ???????????£?????????
                tmp += dfs(A, B - 1, C + 1, who_joker, nxt_turn) * B / denom;   // B ??? C ????????????
                if (who_joker == KOUSAKA) {
                    tmp += dfs(A, B, C, SONODA, nxt_turn) * 1 / denom;
                }
                return ret = tmp;
            } else if (exist(A, B, C, who_joker, MINAMI)) {
                // ???????????????????????¨??? -> ????¢????
                double tmp = 0;
                int denom = numCard(A, B, C, who_joker, MINAMI); // ??????????????£??????????????????????????°
                tmp += dfs(A, B, C - 1, who_joker, nxt_turn) * C / denom;       // C ???????????£?????????
                tmp += dfs(A + 1, B - 1, C, who_joker, nxt_turn) * B / denom;   // B ??? A ????????????
                if (who_joker == MINAMI) {
                    tmp += dfs(A, B, C, SONODA, nxt_turn) * 1 / denom;
                }
                return ret = tmp;
            } else {
                // ?????°?????????????????£??????????????¨??? -> ?????°????????????????????????
                return 0;
            }
            assert(false);
        }
        case MINAMI: {
            if (!exist(A, B, C, who_joker, MINAMI)) {
                // ??????????????????????????£????????? -> ?¬??????????
                return ret = dfs(A, B, C, who_joker, nxt_turn);
            }
            if (exist(A, B, C, who_joker, SONODA)) {
                // ?????°????????????????????¨??? -> ??????????????????
                if (C > 0) {
                    // ??????????????????????????°???????????????
                    return ret = dfs(A, B, C - 1, who_joker, nxt_turn);
                } else if (A > 0) {
                    // ???????????????????????????joker??\??????????????????????????°???????????????
                    return ret = dfs(A - 1, B + 1, C, who_joker, nxt_turn);
                } else {
                    // ?????°?????????joker???????????£?????????????????°???????????????????????§?????? -> ?????°??????????????????
                    return 1;
                }
            } else {
                // ?????°????????????????????¨??? -> ?????°???????????????????????£????????????
                return 1;
            }
            assert(false);
        }
    }
}

signed main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    int n;
    cin >> n;

    vvi cnt(3, vi(n + 1));
    rep(person, 3) {
        int m;
        cin >> m;
        rep(j, m) {
            int card;
            cin >> card;
            cnt[person][card] ^= 1;
        }
    }

    // printVV(cnt);

    int A = 0, B = 0, C = 0;
    rep2(card, 1, n + 1) { // for all cards except joker
        if (cnt[0][card] * cnt[1][card]) A++;
        if (cnt[0][card] * cnt[2][card]) B++;
        if (cnt[1][card] * cnt[2][card]) C++;
    }
    int who_joker = -1;
    rep(i, 3) {
        if (cnt[i][0]) who_joker = i;
    }
    assert(who_joker >= 0 && who_joker <= 2);
    // cerr << A << " " << B << " " << C << " " << who_joker << endl;

    rep(i, 101) rep(j, 101) rep(k, 101) rep(l, 3) rep(m, 3) dp[i][j][k][l][m] = -1;
    cout << fixed << setprecision(10) << dfs(A, B, C, who_joker, KOUSAKA) << endl;
}