#include #include using namespace std; int getmax(int a,int b) { if(a > b) return a; return b; } int getmin(int a,int b) { if(a < b) return a; return b; } int k[1100]; int main() { int t; scanf("%d",&t); while(t--) { int n; scanf("%d",&n); memset(k,0,sizeof(k)); int i = n; while(i--) { int tmp; scanf("%d",&tmp); k[tmp] = 1; } bool flag = false; for(int j = 1; j <= n+2; j++) { if(k[j] == 0 && flag == false) printf("%d",j),flag = true; else if(k[j] == 0 && flag == true) printf(" %d\n",j); } } return 0; }