#include <bits/stdc++.h>
using namespace std;
int main() {
  long int tc;
  cin >> tc;
  while (tc--) {
    long int n, x, i, j;
    cin >> n >> x;
    long int a[201] = {0};
    for (i = 0; i < n; ++i) {
      cin >> j;
      a[j] = 1;
    }
    i = 1;
    j = 1;
    while (j <= x) {
      if (a[i] != 1) {
        a[i] = 1;
        ++j;
      }
      ++i;
    }
    for (i = 1; i < 201; ++i) {
      if (a[i] == 0) {
        j = i - 1;
        break;
      } else
        j = i;
    }
    cout << j << endl;
  }
  return 0;
}
