#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, x;
    cin >> n >> x;
    long long int a;
    long long int arr[n];
    long long int boo[205];
    for (long long int i = 0; i < 205; i++) boo[i] = 0;
    for (long long int i = 0; i < n; i++) {
      cin >> a;
      boo[a - 1] = 1;
    }
    long long int i = 0;
    while (4) {
      if (x == 0 && boo[i] == 0) break;
      if (boo[i] == 1)
        i++;
      else {
        boo[i] = 1;
        x--;
        i++;
      }
    }
    if (boo[i] == 0) {
      cout << i << "\n";
    } else
      cout << i + 1 << "\n";
  }
  return 0;
}
