#include<bits/stdc++.h>
using namespace std;
#define int long long
#define st_cou_fi std::cout<<std::fixed;
#define st_cou_pre std::cout<<std::setprecision(8);
#define IOS ios::sync_with_stdio(0);
int32_t main()
{
    IOS;

        int n[3];
        cin>>n[0]>>n[1]>>n[2];
        int sum[3],maxi[3],mini[3];
        for(int i=0;i<3;i++)
        {
            maxi[i]=INT_MIN;
            mini[i]=INT_MAX;
            sum[i]=0;
            int val;
            for(int j=0;j<n[i];j++)
            {
                cin>>val;
                maxi[i]=max(maxi[i],val);
                mini[i]=min(mini[i],val);
                sum[i]=sum[i]+val;
            }
        }
        int maxx=0;
        for(int i=0;i<3;i++)
        {

            for(int j=0;j<3;j++)
            {
                if(i!=j)
                {
                    int summ=0;
                    int k=0;
                    while((k==i)||(k==j))
                        k++;
                    //cout<<sum[i]<<" "<<sum[j]<<" "<<sum[k]<<endl;
                    summ=summ+sum[k]-mini[k];
                    summ=summ+sum[i]-mini[j];
                    int val=abs((sum[j]-mini[j])-mini[k]);
                    summ=summ+val;
                    maxx=max(maxx,summ);
                    //cout<<" i "<<i<<" j "<<j<<" sum "<<summ<<endl;
                }
            }
        }
        cout<<maxx<<endl;
}
