#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 0x7fffffffffffffff;
const int mod = 1e9 + 7;
const int maxn = 1e6 + 5;
vector<int> edge[maxn];
int vis[maxn], a[maxn];
int n, flag = 1, tot;
void pri(vector<int> a) {
  cout << a.size() << "\n";
  for (auto v : a) {
    cout << v << " ";
  }
  cout << "\n";
}
void add(int x, int y) { edge[x].push_back(y); }
void dfs(int x) {
  if (!flag) return;
  vis[x] = 1;
  for (int i = 0; i < edge[x].size(); i++) {
    int v = edge[x][i];
    if (vis[v] && flag) {
      flag = 0;
      tot = v;
      return;
    }
    dfs(v);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int T;
  cin >> T;
  while (T--) {
    vector<int> ans;
    flag = 1, tot = 0;
    cin >> n;
    for (int i = 1; i <= n; i++) {
      edge[i].clear();
    }
    for (int i = 1; i <= n; i++) {
      vis[i] = 0;
      cin >> a[i];
      add(i, i - a[i]);
    }
    for (int i = 1; i <= n && flag; i++) {
      if (!vis[i]) dfs(i);
    }
    int net = edge[tot][0];
    ans.push_back(tot);
    while (net != tot) {
      ans.push_back(net);
      net = edge[net][0];
    }
    pri(ans);
  }
}
