#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int ts;
  cin >> ts;
  while (ts--) {
    int n, x, mp[205] = {0}, ar[205] = {0}, ans = 0, i;
    cin >> n >> x;
    for (i = 1; i <= n; i++) {
      cin >> ar[i];
      mp[ar[i]] = 1;
    }
    int cnt = 1;
    for (i = 1; cnt <= x; i++) {
      if (mp[i] == 0) {
        mp[i] = 1;
        cnt++;
      }
    }
    for (i = 1; i <= 204; i++) {
      if (mp[i] == 0) {
        break;
      }
      ans = i;
    }
    cout << ans << endl;
  }
}
