#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &a) {
  T w = 1;
  a = 0;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') w = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) a = (a * 10) + (ch - '0');
  a *= w;
}
template <typename T>
inline void ckmax(T &a, T b) {
  a = a > b ? a : b;
}
template <typename T>
inline void ckmin(T &a, T b) {
  a = a < b ? a : b;
}
const int MAX = 1e6 + 10;
struct edge {
  int to, nex;
} e[MAX];
int head[MAX], cnt;
inline void add(int u, int v) {
  e[++cnt].nex = head[u];
  e[cnt].to = v;
  head[u] = cnt;
}
int a[MAX], deep, vis[MAX];
int dfn[MAX], low[MAX];
int ans[MAX], Ans, OK;
int kk[MAX], Ans1;
void tarjan(int u) {
  if (OK) return;
  dfn[u] = low[u] = ++deep;
  vis[u] = 1;
  ans[++Ans] = u;
  for (int i = head[u]; i; i = e[i].nex) {
    int v = e[i].to;
    if (!dfn[v]) {
      tarjan(v);
      low[u] = min(low[u], low[v]);
    } else {
      if (vis[v]) {
        low[u] = min(low[u], dfn[v]);
      }
    }
  }
  if (low[u] == dfn[u] && !OK) {
    Ans1 = 0;
    while (ans[Ans] != u) {
      kk[++Ans1] = ans[Ans];
      vis[ans[Ans]] = 0;
      Ans--;
    }
    kk[++Ans1] = u;
    vis[u] = 0;
    printf("%d\n", Ans1);
    for (int i = 1; i <= Ans1; ++i) printf("%d ", kk[i]);
    puts("");
    OK = 1;
    return;
  }
  return;
}
int main() {
  int T;
  read(T);
  while (T--) {
    OK = 0;
    deep = Ans = cnt = 0;
    int n;
    read(n);
    for (int i = 1; i <= n; ++i) head[i] = 0;
    for (int i = 1; i <= n; ++i) {
      dfn[i] = low[i] = vis[i] = 0;
      read(a[i]);
      add(i, i - a[i]);
    }
    for (int i = 1; i <= n; ++i) {
      if (!dfn[i]) {
        tarjan(i);
      }
      if (OK) break;
    }
  }
}
