#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	int X, Y, Z;
	cin >> X >> Y >> Z;

	pair<int, int> BA[100000];
	int CA[100000];
	int CB[100000];

	ll goukeiA = 0;
	rep(i, X + Y + Z) {
		int a, b, c;
		cin >> a >> b >> c;
		BA[i] = mp(b - a, i);
		CA[i] = c - a;
		CB[i] = c - b;
		goukeiA += a;
	}

	sort(BA, BA + X + Y + Z);

	ll C[100000] = {};
	multiset<int> MS;
	rep(i, X) {
		MS.insert(CA[BA[i].second]);
	}
	rep(i, Z) {
		MS.insert(CA[BA[X + i].second]);
		C[i + 1] = C[i] + *(--MS.end());
		MS.erase(--MS.end());
	}

	MS.clear();
	reverse(BA, BA + X + Y + Z);
	ll B[100000] = {};
	rep(i, Y) {
		B[0] += BA[i].first;
		MS.insert(CB[BA[i].second]);
	}
	rep(i, Z) {
		MS.insert(CB[BA[Y + i].second]);
		B[i + 1] = B[i] + BA[Y + i].first + *(--MS.end());
		MS.erase(--MS.end());
	}

	ll saidai = 0;
	rep(i, Z + 1) saidai = max(saidai, goukeiA + B[i] + C[Z - i]);

	co(saidai);

	Would you please return 0;
}