
// Problem: C. Three Bags
// Contest: Codeforces - Codeforces Round #695 (Div. 2)
// URL: https://codeforces.com/contest/1467/problem/C
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include<bits/stdc++.h>
#define rep(i,x,y) for(auto i=(x);i<=(y);++i)
#define dep(i,x,y) for(auto i=(x);i>=(y);--i)
#define fr first
#define sc second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,ll>pil;
typedef pair<int,int>pii;
typedef pair<ll,ll>pll;
const int N=1e6+10;
const int inf=1e9;
const int mo=998244353;
vector<int> a,b,c;
ll solve(vector<int> &a,vector<int> &b,vector<int> &c){
    ll diff=1e18;
    ll sum1=0,sum2=0,sum3=0;
    for(auto x:a) sum1+=x;
    for(auto x:b) sum2+=x;
    for(auto x:c) sum3+=x;
    ll res=sum1+sum2+sum3;
    int s1=a.size(),s2=b.size(),s3=c.size();
    diff=min(diff,sum2*2);
    diff=min(diff,sum3*2);
    diff=min(diff,(ll)(c[0]+b[0])*2);
    return res-diff;
}
int main(){
    //freopen("D:\\in.txt","r",stdin);
    //freopen("D:\\out.txt","w",stdout);
    int n1,n2,n3; cin>>n1>>n2>>n3;
    rep(i,1,n1) {
        int x; cin>>x; a.push_back(x);
    }
    rep(i,1,n2){
        int x; cin>>x; b.push_back(x);
    }
    rep(i,1,n3){
        int x; cin>>x; c.push_back(x);
    }
    ll ans=0;
    sort(a.begin(),a.end());
    sort(b.begin(),b.end());
    sort(c.begin(),c.end());
    ans=max(ans,solve(a,b,c));
    ans=max(ans,solve(b,a,c));
    ans=max(ans,solve(c,a,b));
    cout<<ans;
    return 0;
}