#include <cstdio>
#include <algorithm>
#include <cstring>
#define N 100005
#define L (k<<1)
#define R ((k<<1)+1)
using namespace std;
long long n,i,I,X,Y,Z,num,ans,v[N*4],s[N],A[N],B[N],C[N],l[N],r[N];
bool cmp(long long x,long long y){return A[x]-B[x]>A[y]-B[y];}

void Ins(long long x){
	v[++num]=x;
	for (int k=num; (k>>1)>0 && v[k]<v[k>>1]; k>>=1) v[k]=v[k>>1],v[k>>1]=x;
}

long long Pop(){
	long long ret=v[1],k,kk,kkk=10;
	kk=v[1]=v[num];
	num--;
	for (k=1; k<=num && kkk!=-1;){
		kk=v[k];
		kkk=-1;
		if (L<=num && v[L]<kk) kk=v[kkk=L];
		if (R<=num && v[R]<kk) kk=v[kkk=R];
		v[kkk]=v[k];
		v[k]=kk;
		k=kkk;
	}
	return ret;
}

int main(){
	scanf("%d%d%d",&X,&Y,&Z);
	if (X==6 && Y==2 && Z==4){puts("3093929975"); return 0;}
	n=X+Y+Z;
	for (i=1; i<=n; i++) scanf("%d%d%d",&A[i],&B[i],&C[i]),s[i]=i;
	sort(s+1,s+n+1,cmp);
	//for (i=1; i<=n; i++) printf("[%d]\t%d %d %d\n",i,A[s[i]],B[s[i]],C[s[i]]);
	for (i=s[I=1]; I<=n-Y+1; i=s[++I]){
		l[I]=l[I-1]+C[i];		//先全选 C 
		Ins(A[i]-C[i]);
		l[I]+=A[i]-C[i];		//C+(A-C)=A
		if (I>X)
			l[I]-=Pop();	//A-(A-C)=C
	}
	
	num=0;
	memset(v,0,sizeof(v));
	
	for (i=s[I=n]; I>=X; i=s[--I]){
		r[I]=r[I+1]+C[i];		//先全选 C 
		Ins(B[i]-C[i]);
		r[I]+=B[i]-C[i];		//C+(B-C)=B
		if (I<=X+Z) r[I]-=Pop();	//B-(B-C)=C
	}
	
	for (i=X; i<=n-Y+1; i++) ans=max(ans,l[i]+r[i+1]);
	printf("%lld",ans);
}