#include <bits/stdc++.h>
using namespace std;
long long int n, q;
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long int powe(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * a);
    }
    a = (a * a);
    b /= 2;
  }
  return res;
}
long long int power(long long int a, long long int b, long long int M) {
  a %= M;
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * a) % M;
    }
    a = (a * a) % M;
    b /= 2;
  }
  return res;
}
long long int extendedEuclid(long long int A, long long int B, long long int &x,
                             long long int &y) {
  if (B == 0) {
    x = 1;
    y = 0;
    return A;
  } else {
    long long int x1, y1;
    long long int gcd = extendedEuclid(B, A % B, x1, y1);
    y = x1 - (A / B) * y1;
    x = y1;
    return gcd;
  }
}
long long int mi(long long int A, long long int M) {
  long long int x, y;
  extendedEuclid(A, M, x, y);
  if (x < 0) {
    x += (long long int)1000000007;
  }
  return x;
}
template <typename T>
void read(T &x) {
  cin >> x;
}
template <typename T, typename T0>
void read(T &x, T0 &y) {
  cin >> x >> y;
}
template <typename T, typename T0, typename T1>
void read(T &x, T0 &y, T1 &z) {
  cin >> x >> y >> z;
}
template <typename T, typename T0, typename T1, typename T2>
void read(T &x, T0 &y, T1 &z, T2 &w) {
  cin >> x >> y >> z >> w;
}
template <typename T, typename T0>
void read(pair<T, T0> &p) {
  cin >> p.first >> p.second;
}
template <typename T, typename T0>
void write(pair<T, T0> &p) {
  write(p.first);
  write(p.second);
}
template <typename T>
void read(vector<T> &oneD, long long int n) {
  for (long long int i = 0; i < n; i++) {
    long long int x;
    read(x);
    oneD.push_back(x);
  }
}
template <typename T>
void read(T oneD[], long long int n) {
  for (long long int i = 0; i < n; i++) {
    read(oneD[i]);
  }
}
template <typename T>
void write(T oneD[], int n) {
  for (long long int i = 0; i < n; i++) {
    write(oneD[i]);
  }
  cout << endl;
}
vector<bool> sieve(1000000, true);
void Sieve() {
  sieve[0] = false;
  sieve[1] = false;
  for (long long int i = 2; i * i <= 1000000; i++) {
    if (sieve[i] == true) {
      for (long long int j = i * i; j < 1000000; j += i) sieve[j] = false;
    }
  }
}
vector<long long int> sieve_spf;
void Sieve_spf() {
  const long long int n = 1e6 + 5;
  sieve_spf.resize(n);
  for (long long int i = 0; i < n; i++) sieve_spf[i] = i;
  sieve_spf[0] = -1;
  sieve_spf[1] = 1;
  for (long long int i = 2; i <= n; i += 2) sieve_spf[i] = 2;
  for (long long int i = 3; i <= n; i += 2)
    if (sieve_spf[i] == i)
      for (long long int j = i * i; j <= n; j += i)
        if (sieve_spf[j] == j) sieve_spf[j] = i;
}
bool oppositeSigns(long long int x, long long int y) { return ((x ^ y) < 0); }
int mpt(long long int n) {
  long long int c = 0;
  long long int n1 = pow(2, c);
  while (n1 < n) {
    c++;
    n1 = pow(2, c);
  }
  return c;
}
void the_happiest_place_on_earth() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
}
int main() {
  the_happiest_place_on_earth();
  long long int t;
  read(t);
  while (t--) {
    long long int k;
    read(n, k);
    long long int a[n], b[n];
    for (long long int i = 0; i < n; i++) read(a[i]);
    for (long long int i = 0; i < n; i++) read(b[i]);
    sort(a, a + n);
    sort(b, b + n, greater<long long int>());
    long long int ans = 0, m = 0;
    for (long long int i = 0; i < n; i++) ans += a[i];
    for (long long int i = 1; i <= k; i++) {
      long long int sum1 = 0, sum2 = 0;
      ans = 0;
      for (long long int j = 0; j < i; j++) sum1 += a[j];
      for (long long int j = 0; j < i; j++) sum2 += b[j];
      for (long long int j = i; j < n; j++) ans += a[j];
      ans += max(sum1, sum2);
      m = max(m, ans);
    }
    if (k != 0)
      cout << m << "\n";
    else
      cout << ans << "\n";
  }
  return 0;
}

### Prompt

Develop a solution in cpp to the problem described below:

You are given two arrays a and b both consisting of n positive (greater than zero) integers. You are also given an integer k.

In one move, you can choose two indices i and j (1 ≤ i, j ≤ n) and swap a_i and b_j (i.e. a_i becomes b_j and vice versa). Note that i and j can be equal or different (in particular, swap a_2 with b_2 or swap a_3 and b_9 both are acceptable moves).

Your task is to find the maximum possible sum you can obtain in the array a if you can do no more than (i.e. at most) k such moves (swaps).

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 200) — the number of test cases. Then t test cases follow.

The first line of the test case contains two integers n and k (1 ≤ n ≤ 30; 0 ≤ k ≤ n) — the number of elements in a and b and the maximum number of moves you can do. The second line of the test case contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 30), where a_i is the i-th element of a. The third line of the test case contains n integers b_1, b_2, ..., b_n (1 ≤ b_i ≤ 30), where b_i is the i-th element of b.

Output

For each test case, print the answer — the maximum possible sum you can obtain in the array a if you can do no more than (i.e. at most) k swaps.

Example

Input


5
2 1
1 2
3 4
5 5
5 5 6 6 5
1 2 5 4 3
5 3
1 2 3 4 5
10 9 10 10 9
4 0
2 2 4 3
2 4 2 3
4 4
1 2 2 1
4 4 5 4


Output


6
27
39
11
17

Note

In the first test case of the example, you can swap a_1 = 1 and b_2 = 4, so a=[4, 2] and b=[3, 1].

In the second test case of the example, you don't need to swap anything.

In the third test case of the example, you can swap a_1 = 1 and b_1 = 10, a_3 = 3 and b_3 = 10 and a_2 = 2 and b_4 = 10, so a=[10, 10, 10, 4, 5] and b=[1, 9, 3, 2, 9].

In the fourth test case of the example, you cannot swap anything.

In the fifth test case of the example, you can swap arrays a and b, so a=[4, 4, 5, 4] and b=[1, 2, 2, 1].

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long int n, q;
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long int powe(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * a);
    }
    a = (a * a);
    b /= 2;
  }
  return res;
}
long long int power(long long int a, long long int b, long long int M) {
  a %= M;
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * a) % M;
    }
    a = (a * a) % M;
    b /= 2;
  }
  return res;
}
long long int extendedEuclid(long long int A, long long int B, long long int &x,
                             long long int &y) {
  if (B == 0) {
    x = 1;
    y = 0;
    return A;
  } else {
    long long int x1, y1;
    long long int gcd = extendedEuclid(B, A % B, x1, y1);
    y = x1 - (A / B) * y1;
    x = y1;
    return gcd;
  }
}
long long int mi(long long int A, long long int M) {
  long long int x, y;
  extendedEuclid(A, M, x, y);
  if (x < 0) {
    x += (long long int)1000000007;
  }
  return x;
}
template <typename T>
void read(T &x) {
  cin >> x;
}
template <typename T, typename T0>
void read(T &x, T0 &y) {
  cin >> x >> y;
}
template <typename T, typename T0, typename T1>
void read(T &x, T0 &y, T1 &z) {
  cin >> x >> y >> z;
}
template <typename T, typename T0, typename T1, typename T2>
void read(T &x, T0 &y, T1 &z, T2 &w) {
  cin >> x >> y >> z >> w;
}
template <typename T, typename T0>
void read(pair<T, T0> &p) {
  cin >> p.first >> p.second;
}
template <typename T, typename T0>
void write(pair<T, T0> &p) {
  write(p.first);
  write(p.second);
}
template <typename T>
void read(vector<T> &oneD, long long int n) {
  for (long long int i = 0; i < n; i++) {
    long long int x;
    read(x);
    oneD.push_back(x);
  }
}
template <typename T>
void read(T oneD[], long long int n) {
  for (long long int i = 0; i < n; i++) {
    read(oneD[i]);
  }
}
template <typename T>
void write(T oneD[], int n) {
  for (long long int i = 0; i < n; i++) {
    write(oneD[i]);
  }
  cout << endl;
}
vector<bool> sieve(1000000, true);
void Sieve() {
  sieve[0] = false;
  sieve[1] = false;
  for (long long int i = 2; i * i <= 1000000; i++) {
    if (sieve[i] == true) {
      for (long long int j = i * i; j < 1000000; j += i) sieve[j] = false;
    }
  }
}
vector<long long int> sieve_spf;
void Sieve_spf() {
  const long long int n = 1e6 + 5;
  sieve_spf.resize(n);
  for (long long int i = 0; i < n; i++) sieve_spf[i] = i;
  sieve_spf[0] = -1;
  sieve_spf[1] = 1;
  for (long long int i = 2; i <= n; i += 2) sieve_spf[i] = 2;
  for (long long int i = 3; i <= n; i += 2)
    if (sieve_spf[i] == i)
      for (long long int j = i * i; j <= n; j += i)
        if (sieve_spf[j] == j) sieve_spf[j] = i;
}
bool oppositeSigns(long long int x, long long int y) { return ((x ^ y) < 0); }
int mpt(long long int n) {
  long long int c = 0;
  long long int n1 = pow(2, c);
  while (n1 < n) {
    c++;
    n1 = pow(2, c);
  }
  return c;
}
void the_happiest_place_on_earth() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
}
int main() {
  the_happiest_place_on_earth();
  long long int t;
  read(t);
  while (t--) {
    long long int k;
    read(n, k);
    long long int a[n], b[n];
    for (long long int i = 0; i < n; i++) read(a[i]);
    for (long long int i = 0; i < n; i++) read(b[i]);
    sort(a, a + n);
    sort(b, b + n, greater<long long int>());
    long long int ans = 0, m = 0;
    for (long long int i = 0; i < n; i++) ans += a[i];
    for (long long int i = 1; i <= k; i++) {
      long long int sum1 = 0, sum2 = 0;
      ans = 0;
      for (long long int j = 0; j < i; j++) sum1 += a[j];
      for (long long int j = 0; j < i; j++) sum2 += b[j];
      for (long long int j = i; j < n; j++) ans += a[j];
      ans += max(sum1, sum2);
      m = max(m, ans);
    }
    if (k != 0)
      cout << m << "\n";
    else
      cout << ans << "\n";
  }
  return 0;
}

```