#include <bits/stdc++.h>
#include <chrono>

using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
#define xx first
#define yy second
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll read(int n, pii& smallest, ll& sum){
    ll small = 1e9, here = 0;
    for(int i = 0; i < n; i++){
        ll a; cin>>a;
        small = min(small, a);
        sum += a;
        here += a;
    }
    if(small < smallest.first )
        smallest.second = smallest.first, smallest.first = small;
    else if(small < smallest.second)
        smallest.second = small;
    return here;
}
void solve(){
    int n1,n2,n3;
    cin>>n1>>n2>>n3;
    ll sum = 0;
    pii smallest = {2e9, 2e9};
    ll x1 = 2*read(n1, smallest, sum);
    ll x2 = 2*read(n2, smallest, sum);
    ll x3 = 2*read(n3, smallest, sum);
    ll neg = min( min(x1, x2), min(x3, 2*(smallest.first + smallest.second)) );
    cout<<sum - neg<<"\n";
}
int main(){
    cin.sync_with_stdio(false);
    cout.sync_with_stdio(false);
    solve();
}