#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#define ll long long
#define PI 3.141592653589
#define IO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define EPS 1e-7
#define ff first
#define ss second
#define print(val) "[ " << #val ": " << (val) << " ]\n"
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag,
             tree_order_statistics_node_update>
    ordered_set;
constexpr ll MOD = 998244353;
const int RANDOM = chrono::high_resolution_clock::now().time_since_epoch().count();
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int random_int(int l,int r){return uniform_int_distribution<int>(l,r)(rng);}
struct Debug;
template<typename T, typename C = std::ostream&>
struct hasPrint : false_type{};
template<typename T>
struct hasPrint<T, decltype(cout << declval<T>())>: true_type{};
struct Debug{
    template<typename T>
    typename enable_if<hasPrint<T>::value, Debug&>::type operator << (const T& t){
        cerr << t;
        return *this;
    }
    template<typename T>
    typename enable_if<!hasPrint<T>::value, Debug&>::type operator << (const T& t){
        auto ed = t.end();
        *this << "[";
        for(auto it = t.begin(); it != ed; it++){
            if(next(it) == ed){
                *this << *it; continue;
            }
            *this << *it << ", ";
        }
        *this << "]";
        return *this;
    }
    template<typename T, typename C>
    Debug& operator << (const pair<T,C>& t){
        *this << "[ " << t.first << ", " << t.second << " ]";
        return *this;
    }
};
constexpr ll fast_power(ll x, ll p){
    ll res = 1;
    while(p > 0){
        if(p & 1){
            res = (res * x)%MOD;
        }
        p = p >> 1;
        x = (x*x)%MOD;
    }
    return res;
}
ll getRange(int l, int r, vector<ll>& prefix){
    if(l == prefix.size()){
        return 0;
    }
    return prefix[r] - ((l > 0) ? prefix[l-1] : 0);
}
int x, y, a, b, c;
vector<ll> prefix, prefix2, prefix3, cnt;
bool check(int cur, ll target, ll left){
    return  b+c - min(getRange(cur, b+c-1, cnt), left) - cur >= target;
}
int bS(int low, int high, int target, int left){
    while(low < high){
        int mid = low + (high-low+1)/2;
        if(check(mid, target, left)){
            low = mid;
        }else{
            high = mid-1;
        }
    }
    return low;
}
int main() {
    IO;
    cin >> x >> y >> a >> b >> c;
    vector<int> p(a), q(b), r(c);
    vector<pair<int,int>> v(b+c);
    for(int i = 0; i < a; i++){
        cin >> p[i];
    }
    for(int i = 0; i < b; i++){
        cin >> q[i];
        v[i] = {q[i], 0};
    }
    for(int i = 0; i < c; i++){
        cin >> r[i];
        v[i+b] = {r[i],1};
    }
    sort(v.begin(), v.end());
    sort(r.begin(), r.end());
    sort(p.begin(), p.end());
    prefix.resize(a);
    prefix2.resize(b+c);
    prefix3.resize(c);
    cnt.resize(b+c);
    prefix[0] = p[0];
    for(int i = 1; i < a; i++){
        prefix[i] = prefix[i-1] + p[i];
    }
    prefix2[0] = v[0].ff;
    cnt[0] = v[0].ss;
    for(int i = 1; i < b+c; i++){
        prefix2[i] = prefix2[i-1] + v[i].ff;
        cnt[i] = cnt[i-1] + v[i].ss;
    }
    prefix3[0] = r[0];
    for(int i =  1; i < c; i++){
        prefix3[i] = prefix3[i-1] + r[i];
    }
    ll mx = 0;
    for(int i = 0; i <= x; i++){
        ll left = x-i;
        if(left > c){
            continue;
        }
        int take = y;
        int idx = bS(0, b+c-1, y, left);
        ll colorless = min(left,getRange(idx, b+c-1, cnt));
        ll colorlessSum = getRange(c-left, c-1, prefix3);
        take += colorless;
        if(take > b+c){
            continue;
        }
        ll sum = getRange(a-i, a-1, prefix) + getRange(b+c-take, b+c-1, prefix2);
        sum -= getRange(c-colorless, c-1, prefix3);
        mx = max(mx, sum+colorlessSum);
    }
    cout << mx;
    return 0;
}


Measured memory_bytes: 7680