#include <bits/stdc++.h>

using namespace std;

#define int long long

const int N = 1e5 + 100, INF = 3e18;

int a[N], b[N], c[N], arr[N], l[N], r[N];
int x, y, z, n, sum, ans;
multiset<int> s;

int32_t main() {
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    cin >> x >> y >> z;
    n = x + y + z;
    for (int i = 0; i < n; i++) {
	cin >> a[i] >> b[i] >> c[i];
	sum += c[i];
	a[i] -= c[i]; b[i] -= c[i];
	arr[i] = i;
    }
    sort(arr, arr + n, [&] (int i, int j) {return a[i] - b[i] < a[j] - b[j];});
    int tmp = 0;
    for (int o = 0; o < n; o++) {
	int i = arr[o];
	if (o < y) {
	    tmp += b[i];
	    s.insert(b[i]);
	}
	else {
	    tmp += max(0LL, b[i] - *s.begin());
	    s.insert(b[i]);
	    s.erase(s.begin());
	}
	l[o] = (o < y - 1 ? -INF : tmp);
    }
    s.clear();
    tmp = 0;
    for (int o = n - 1; o >= 0; o--) {
	int i = arr[o];
	if (o >= n - x) {
	    s.insert(a[i]);
	    tmp += a[i];
	}
	else {
	    tmp += max(0LL, a[i] - *s.begin());
	    s.insert(a[i]);
	    s.erase(s.begin());
	}
	r[o] = (o > n - x ? -INF : tmp);
    }
    ans = -INF;
    for (int i = 0; i < n - 1; i++)
	ans = max(ans, l[i] + r[i + 1]);
    return cout << ans + sum, 0;
}