#include<bits/stdc++.h>
#define inf 1000000000
#define ll long long
#define N 100005
using namespace std;
ll x,y,z,n,a[N],b[N],c[N],d[N],e[N],s[N],p[N];
priority_queue<ll,vector<ll>,greater<ll> >q;
bool cmp(ll x,ll y)
{
	return d[x]>d[y];
}
int main()
{
	ll Ans=-1e18;
	scanf("%lld%lld%lld",&x,&y,&z);n=x+y+z;
	ll sum=0;
	for (int i=1;i<=n;i++)
	{
		scanf("%lld%lld%lld",&a[i],&b[i],&c[i]);
		sum+=a[i];
		d[i]=b[i]-c[i];
		e[i]=i;
	}
	sort(e+1,e+n+1,cmp);
	ll now=0;
	for (int i=1;i<=y;i++)
		q.push(-inf),now+=-inf;
	for (int i=1;i<=n;i++)
	{
		q.push(b[e[i]]-a[e[i]]);
		now+=b[e[i]]-a[e[i]]-q.top();
		p[i]=now;
		q.pop();
	}
	now=0;
	while(q.size())q.pop();
	for (int i=1;i<=z;i++)
		q.push(-inf),now+=-inf;
	for (int i=n;i>=1;i--)
	{
		q.push(c[e[i]]-a[e[i]]);
		now+=c[e[i]]-a[e[i]]-q.top();
		s[i]=now;
		q.pop();
	//	cout<<p[i-1]<<' '<<s[i]<<endl;
		if (i-1>=y)Ans=max(p[i-1]+s[i],Ans);
	}
	printf("%lld\n",Ans+sum);
}