#include <bits/stdc++.h>

using namespace std;

using ll = long long;

const int N = 3e5 + 5;

int n[3], a[3][N]; ll sum[3];

int main() {
    ios::sync_with_stdio(false); cin.tie(0);
    cin >> n[0] >> n[1] >> n[2];
    for (int i = 0; i < 3; i++)
        for (int j = 1; j <= n[i]; j++)
            cin >> a[i][j], sum[i] += a[i][j];
    for (int i = 0; i < 3; i++)
        sort(a[i] + 1, a[i] + n[i] + 1);
    ll res = 0;
    for (int i = 0; i < 3; i++) {
        int j = (i + 1) % 3;
        int k = (i + 2) % 3;
        res = max(res, sum[i] + sum[j] + sum[k] - 2 * a[j][1] - 2 * a[k][1]);
        res = max(res, sum[i] + sum[j] - sum[k]);
        res = max(res, sum[i] + sum[k] - sum[j]);
    }
    cout << res << endl;
    return 0;
}
