#include<bits/stdc++.h>
using namespace std;

/*###   Fast-IO  ###*/

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

/*###   GCC-Optimizers  ###*/

#pragma comment(linker, "/stack:247474112")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

/*###   Inputs   ###*/

#define testcases int testcases;cin>>testcases; while(testcases--)
#define queries int queries;cin>>queries; while(queries--)

/*###   Print-Multiple-At-A-Time   ###*/

template <typename T> void print(T t) { cout << t << endl; }
template<typename T, typename... Args> void print(T t, Args... args) { cout << t << " "; print(args...); }

/*
//Policy Based Data Structure
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;
typedef tree<
    int,
    null_type,
    less<int>,
    rb_tree_tag,
    tree_order_statistics_node_update > pbds;
*/

/*###   SsSsSs   ###*/

#define endl "\n"
#define ll long long
#define int long long
#define double long double

#define pb push_back
#define eb emplace_back
#define mp make_pair

typedef vector<int>vi;
typedef pair<int, int>pii;
typedef vector<pii>vpii;
typedef tuple<int, int> tii;
typedef tuple<int, int, int>tiii;

typedef priority_queue<int, vector<int > > max_pq;
typedef priority_queue<int, vector<int> , greater<int>  > min_pq;

int toint(const string &s) {stringstream ss; ss << s; int x; ss >> x; return x;}
string tostring ( int number ) {stringstream ss; ss << number; return ss.str();}

#define ar array
#define ff first
#define ss second
#define litemaxx return 0;
#define lite continue;
#define space " ";
#define ini(a, i) memset(a, i, sizeof(a))

#define f1(n) for(ll i=1;i<=n;i++)
#define f0(n) for(ll i=0;i<=n-1;i++)
#define b1(n) for(ll i=n;i>=1;--i)
#define b0(n) for(ll i=n-1;i>=0;--i)
#define flr(a,l,r) for(ll a=l; a<=r;++a)
#define rlf(a,r,l) for(ll a=r; a>=l;--a)

#define max(a,b) (a>=b?a:b)
#define min(a,b) (a<=b?a:b)
#define diff(a,b) (a>=b?a-b:b-a)

#define all(a) a.begin(),a.end()

#define sorta(a) sort(all(a));
#define sortd(a) sort(all(a), greater<ll>());
#define sortdp(a) sort(all(a), greater<pair<ll, ll>>());

#define lb(a, b) lower_bound(all(a), b);
#define ub(a, b) upper_bound(all(a), b);
#define plb(a, b) lower_bound(all(a), b) - a.begin();
#define pub(a, b) upper_bound(all(a), b) - a.begin();


/*###   Timer   ###*/

void time() {
#ifndef ONLINE_JUDGE
	cout << "\nTime: " << 1.0 * clock() / CLOCKS_PER_SEC << "s\n";
#endif
}

/* WT */

#define vt vector
#define sz(x) (int)(x).size()

#define F_OR(i, a, b, s) for (int i=(a); (s)>0?i<(b):i>(b); i+=(s))
#define F_OR1(e) F_OR(i, 0, e, 1)
#define F_OR2(i, e) F_OR(i, 0, e, 1)
#define F_OR3(i, b, e) F_OR(i, b, e, 1)
#define F_OR4(i, b, e, s) F_OR(i, b, e, s)
#define GET5(a, b, c, d, e, ...) e
#define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1)
#define FOR(...) F_ORC(__VA_ARGS__)(__VA_ARGS__)
#define EACH(x, a) for (auto& x: a)

template<class T> bool umin(T& a, const T& b) {
	return b < a ? a = b, 1 : 0;
}
template<class T> bool umax(T& a, const T& b) {
	return a < b ? a = b, 1 : 0;
}

ll FIRSTTRUE(function<bool(ll)> f, ll lb, ll rb) {
	while (lb < rb) {
		ll mb = (lb + rb) / 2;
		f(mb) ? rb = mb : lb = mb + 1;
	}
	return lb;
}
ll LASTTRUE(function<bool(ll)> f, ll lb, ll rb) {
	while (lb < rb) {
		ll mb = (lb + rb + 1) / 2;
		f(mb) ? lb = mb : rb = mb - 1;
	}
	return lb;
}

template<class A> void read(vt<A>& v);
template<class A, size_t S> void read(ar<A, S>& a);
template<class T> void read(T& x) {
	cin >> x;
}
void read(double& d) {
	string t;
	read(t);
	d = stold(t);
}
// void read(long double& d) {
// 	string t;
// 	read(t);
// 	d = stold(t);
// }
template<class H, class... T> void read(H& h, T&... t) {
	read(h);
	read(t...);
}
template<class A> void read(vt<A>& x) {
	EACH(a, x)
	read(a);
}
template<class A, size_t S> void read(array<A, S>& x) {
	EACH(a, x)
	read(a);
}

string to_string(char c) {
	return string(1, c);
}
string to_string(bool b) {
	return b ? "true" : "false";
}
string to_string(const char* s) {
	return string(s);
}
string to_string(string s) {
	return s;
}
string to_string(vt<bool> v) {
	string res;
	FOR(sz(v))
	res += char('0' + v[i]);
	return res;
}

template<size_t S> string to_string(bitset<S> b) {
	string res;
	FOR(S)
	res += char('0' + b[i]);
	return res;
}
template<class T> string to_string(T v) {
	bool f = 1;
	string res;
	EACH(x, v) {
		if (!f)
			res += ' ';
		f = 0;
		res += to_string(x);
	}
	return res;
}

template<class A> void write(A x) {
	cout << to_string(x);
}
template<class H, class... T> void write(const H& h, const T&... t) {
	write(h);
	write(t...);
}
void print() {
	write("\n");
}
template<class H, class... T> void print(const H& h, const T&... t) {
	write(h);
	if (sizeof...(t))
		write(' ');
	print(t...);
}

void DBG() {
	cerr << "]" << endl;
}
template<class H, class... T> void DBG(H h, T... t) {
	cerr << to_string(h);
	if (sizeof...(t))
		cerr << ", ";
	DBG(t...);
}
#ifdef _DEBUG
#define dbg(...) cerr << "LINE(" << __LINE__ << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
#else
#define dbg(...) 0
#endif

template<class T> void offset(ll o, T& x) {
	x += o;
}
template<class T> void offset(ll o, vt<T>& x) {
	EACH(a, x)
	offset(o, a);
}
template<class T, size_t S> void offset(ll o, ar<T, S>& x) {
	EACH(a, x)
	offset(o, a);
}

mt19937 mt_rng(chrono::steady_clock::now().time_since_epoch().count());
ll randint(ll a, ll b) {
	return uniform_int_distribution<ll>(a, b)(mt_rng);
}

template<class T, class U> void vti(vt<T> &v, U x, size_t n) {
	v = vt<T>(n, x);
}
template<class T, class U> void vti(vt<T> &v, U x, size_t n, size_t m...) {
	v = vt<T>(n);
	EACH(a, v)
	vti(a, x, m);
}

/****************************************************** END OF TEMPLATE *******************************************************/

/*### Constants ###*/
#define INF INT_MAX
const int despacito = 1e9 + 7;
const int despacito_huge = 1e18 + 7;

/*### Variables ###*/
const int mod = 1e9 + 7;
const int maxn = 1e6 + 5;
const int N = 1e6 + 5;


int64_t INF64 = int64_t(2e18) + 5;


int32_t main() {

	IOS;

	array<int, 3> N;
	cin >> N[0] >> N[1] >> N[2];
	array<vector<int64_t>, 3> bags;

	for (int b = 0; b < 3; b++) {
		bags[b].resize(N[b]);

		for (auto &v : bags[b])
			cin >> v;

		sort(bags[b].begin(), bags[b].end());
	}

	int64_t best = -INF64;
// Negate a whole bag.
	for (int neg = 0; neg < 3; neg++) {
		int64_t sum = 0;

		for (int b = 0; b < 3; b++)
			for (auto &v : bags[b])
				sum += (b == neg ? -1 : +1) * v;

		best = max(best, sum);
	}

	// Negate one number from each of two bags.
	for (int x = 0; x < 3; x++)
		for (int y = x + 1; y < 3; y++) {
			int64_t sum = 0;

			for (int b = 0; b < 3; b++)
				for (auto &v : bags[b])
					sum += v;

			sum -= 2LL * (bags[x].front() + bags[y].front());
			best = max(best, sum);
		}

	cout << best << '\n';








	//time();
	return 0;
}
### Prompt

Create a solution in cpp for the following problem:

You are given three bags. Each bag contains a non-empty multiset of numbers. You can perform a number of operations on these bags. In one operation, you can choose any two non-empty bags, and choose one number from each of the bags. Let's say that you choose number a from the first bag and number b from the second bag. Then, you remove b from the second bag and replace a with a-b in the first bag. Note that if there are multiple occurrences of these numbers, then you shall only remove/replace exactly one occurrence.

You have to perform these operations in such a way that you have exactly one number remaining in exactly one of the bags (the other two bags being empty). It can be shown that you can always apply these operations to receive such a configuration in the end. Among all these configurations, find the one which has the maximum number left in the end.

Input

The first line of the input contains three space-separated integers n_1, n_2 and n_3 (1 ≤ n_1, n_2, n_3 ≤ 3⋅10^5, 1 ≤ n_1+n_2+n_3 ≤ 3⋅10^5) — the number of numbers in the three bags.

The i-th of the next three lines contain n_i space-separated integers a_{{i,1}}, a_{{i,2}}, ..., a_{{i,{{n_i}}}} (1 ≤ a_{{i,j}} ≤ 10^9) — the numbers in the i-th bag.

Output

Print a single integer — the maximum number which you can achieve in the end.

Examples

Input


2 4 1
1 2
6 3 4 5
5


Output


20

Input


3 2 2
7 5 4
2 9
7 1


Output


29

Note

In the first example input, let us perform the following operations:

[1, 2], [6, 3, 4, 5], [5]

[-5, 2], [3, 4, 5], [5] (Applying an operation to (1, 6))

[-10, 2], [3, 4], [5] (Applying an operation to (-5, 5))

[2], [3, 4], [15] (Applying an operation to (5, -10))

[-1], [4], [15] (Applying an operation to (2, 3))

[-5], [], [15] (Applying an operation to (-1, 4))

[], [], [20] (Applying an operation to (15, -5))

You can verify that you cannot achieve a bigger number. Hence, the answer is 20.

### Response

```cpp
#include<bits/stdc++.h>
using namespace std;

/*###   Fast-IO  ###*/

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

/*###   GCC-Optimizers  ###*/

#pragma comment(linker, "/stack:247474112")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

/*###   Inputs   ###*/

#define testcases int testcases;cin>>testcases; while(testcases--)
#define queries int queries;cin>>queries; while(queries--)

/*###   Print-Multiple-At-A-Time   ###*/

template <typename T> void print(T t) { cout << t << endl; }
template<typename T, typename... Args> void print(T t, Args... args) { cout << t << " "; print(args...); }

/*
//Policy Based Data Structure
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;
typedef tree<
    int,
    null_type,
    less<int>,
    rb_tree_tag,
    tree_order_statistics_node_update > pbds;
*/

/*###   SsSsSs   ###*/

#define endl "\n"
#define ll long long
#define int long long
#define double long double

#define pb push_back
#define eb emplace_back
#define mp make_pair

typedef vector<int>vi;
typedef pair<int, int>pii;
typedef vector<pii>vpii;
typedef tuple<int, int> tii;
typedef tuple<int, int, int>tiii;

typedef priority_queue<int, vector<int > > max_pq;
typedef priority_queue<int, vector<int> , greater<int>  > min_pq;

int toint(const string &s) {stringstream ss; ss << s; int x; ss >> x; return x;}
string tostring ( int number ) {stringstream ss; ss << number; return ss.str();}

#define ar array
#define ff first
#define ss second
#define litemaxx return 0;
#define lite continue;
#define space " ";
#define ini(a, i) memset(a, i, sizeof(a))

#define f1(n) for(ll i=1;i<=n;i++)
#define f0(n) for(ll i=0;i<=n-1;i++)
#define b1(n) for(ll i=n;i>=1;--i)
#define b0(n) for(ll i=n-1;i>=0;--i)
#define flr(a,l,r) for(ll a=l; a<=r;++a)
#define rlf(a,r,l) for(ll a=r; a>=l;--a)

#define max(a,b) (a>=b?a:b)
#define min(a,b) (a<=b?a:b)
#define diff(a,b) (a>=b?a-b:b-a)

#define all(a) a.begin(),a.end()

#define sorta(a) sort(all(a));
#define sortd(a) sort(all(a), greater<ll>());
#define sortdp(a) sort(all(a), greater<pair<ll, ll>>());

#define lb(a, b) lower_bound(all(a), b);
#define ub(a, b) upper_bound(all(a), b);
#define plb(a, b) lower_bound(all(a), b) - a.begin();
#define pub(a, b) upper_bound(all(a), b) - a.begin();


/*###   Timer   ###*/

void time() {
#ifndef ONLINE_JUDGE
	cout << "\nTime: " << 1.0 * clock() / CLOCKS_PER_SEC << "s\n";
#endif
}

/* WT */

#define vt vector
#define sz(x) (int)(x).size()

#define F_OR(i, a, b, s) for (int i=(a); (s)>0?i<(b):i>(b); i+=(s))
#define F_OR1(e) F_OR(i, 0, e, 1)
#define F_OR2(i, e) F_OR(i, 0, e, 1)
#define F_OR3(i, b, e) F_OR(i, b, e, 1)
#define F_OR4(i, b, e, s) F_OR(i, b, e, s)
#define GET5(a, b, c, d, e, ...) e
#define F_ORC(...) GET5(__VA_ARGS__, F_OR4, F_OR3, F_OR2, F_OR1)
#define FOR(...) F_ORC(__VA_ARGS__)(__VA_ARGS__)
#define EACH(x, a) for (auto& x: a)

template<class T> bool umin(T& a, const T& b) {
	return b < a ? a = b, 1 : 0;
}
template<class T> bool umax(T& a, const T& b) {
	return a < b ? a = b, 1 : 0;
}

ll FIRSTTRUE(function<bool(ll)> f, ll lb, ll rb) {
	while (lb < rb) {
		ll mb = (lb + rb) / 2;
		f(mb) ? rb = mb : lb = mb + 1;
	}
	return lb;
}
ll LASTTRUE(function<bool(ll)> f, ll lb, ll rb) {
	while (lb < rb) {
		ll mb = (lb + rb + 1) / 2;
		f(mb) ? lb = mb : rb = mb - 1;
	}
	return lb;
}

template<class A> void read(vt<A>& v);
template<class A, size_t S> void read(ar<A, S>& a);
template<class T> void read(T& x) {
	cin >> x;
}
void read(double& d) {
	string t;
	read(t);
	d = stold(t);
}
// void read(long double& d) {
// 	string t;
// 	read(t);
// 	d = stold(t);
// }
template<class H, class... T> void read(H& h, T&... t) {
	read(h);
	read(t...);
}
template<class A> void read(vt<A>& x) {
	EACH(a, x)
	read(a);
}
template<class A, size_t S> void read(array<A, S>& x) {
	EACH(a, x)
	read(a);
}

string to_string(char c) {
	return string(1, c);
}
string to_string(bool b) {
	return b ? "true" : "false";
}
string to_string(const char* s) {
	return string(s);
}
string to_string(string s) {
	return s;
}
string to_string(vt<bool> v) {
	string res;
	FOR(sz(v))
	res += char('0' + v[i]);
	return res;
}

template<size_t S> string to_string(bitset<S> b) {
	string res;
	FOR(S)
	res += char('0' + b[i]);
	return res;
}
template<class T> string to_string(T v) {
	bool f = 1;
	string res;
	EACH(x, v) {
		if (!f)
			res += ' ';
		f = 0;
		res += to_string(x);
	}
	return res;
}

template<class A> void write(A x) {
	cout << to_string(x);
}
template<class H, class... T> void write(const H& h, const T&... t) {
	write(h);
	write(t...);
}
void print() {
	write("\n");
}
template<class H, class... T> void print(const H& h, const T&... t) {
	write(h);
	if (sizeof...(t))
		write(' ');
	print(t...);
}

void DBG() {
	cerr << "]" << endl;
}
template<class H, class... T> void DBG(H h, T... t) {
	cerr << to_string(h);
	if (sizeof...(t))
		cerr << ", ";
	DBG(t...);
}
#ifdef _DEBUG
#define dbg(...) cerr << "LINE(" << __LINE__ << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
#else
#define dbg(...) 0
#endif

template<class T> void offset(ll o, T& x) {
	x += o;
}
template<class T> void offset(ll o, vt<T>& x) {
	EACH(a, x)
	offset(o, a);
}
template<class T, size_t S> void offset(ll o, ar<T, S>& x) {
	EACH(a, x)
	offset(o, a);
}

mt19937 mt_rng(chrono::steady_clock::now().time_since_epoch().count());
ll randint(ll a, ll b) {
	return uniform_int_distribution<ll>(a, b)(mt_rng);
}

template<class T, class U> void vti(vt<T> &v, U x, size_t n) {
	v = vt<T>(n, x);
}
template<class T, class U> void vti(vt<T> &v, U x, size_t n, size_t m...) {
	v = vt<T>(n);
	EACH(a, v)
	vti(a, x, m);
}

/****************************************************** END OF TEMPLATE *******************************************************/

/*### Constants ###*/
#define INF INT_MAX
const int despacito = 1e9 + 7;
const int despacito_huge = 1e18 + 7;

/*### Variables ###*/
const int mod = 1e9 + 7;
const int maxn = 1e6 + 5;
const int N = 1e6 + 5;


int64_t INF64 = int64_t(2e18) + 5;


int32_t main() {

	IOS;

	array<int, 3> N;
	cin >> N[0] >> N[1] >> N[2];
	array<vector<int64_t>, 3> bags;

	for (int b = 0; b < 3; b++) {
		bags[b].resize(N[b]);

		for (auto &v : bags[b])
			cin >> v;

		sort(bags[b].begin(), bags[b].end());
	}

	int64_t best = -INF64;
// Negate a whole bag.
	for (int neg = 0; neg < 3; neg++) {
		int64_t sum = 0;

		for (int b = 0; b < 3; b++)
			for (auto &v : bags[b])
				sum += (b == neg ? -1 : +1) * v;

		best = max(best, sum);
	}

	// Negate one number from each of two bags.
	for (int x = 0; x < 3; x++)
		for (int y = x + 1; y < 3; y++) {
			int64_t sum = 0;

			for (int b = 0; b < 3; b++)
				for (auto &v : bags[b])
					sum += v;

			sum -= 2LL * (bags[x].front() + bags[y].front());
			best = max(best, sum);
		}

	cout << best << '\n';








	//time();
	return 0;
}
```