#include <bits/stdc++.h>
using namespace std;
const int N = 1234567;
int n;
int a[N], b[N], parent[N], vis[N];
bool done;
void FindCycle(int u) {
  if (done) {
    return;
  }
  vis[u] = true;
  int v = b[u];
  if (vis[v]) {
    int cur = u;
    vector<int> sol;
    do {
      sol.push_back(cur);
      cur = parent[cur];
    } while (cur != parent[v]);
    printf("%d\n", (int)sol.size());
    for (int vertex : sol) {
      printf("%d ", vertex);
    }
    printf("\n");
    done = true;
  } else {
    parent[v] = u;
    FindCycle(v);
  }
}
void Solve() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    b[i] = i - a[i];
    vis[i] = false;
  }
  parent[1] = 0;
  done = false;
  FindCycle(1);
}
int main() {
  int z;
  scanf("%d", &z);
  while (z--) {
    Solve();
  }
}
