#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma loop - opt(on)
using namespace std;
long long int t, n;
vector<long long int> ans, a, vis, par;
vector<vector<long long int>> mp;
long long int dfs(long long int x) {
  long long int ans = -1;
  for (auto i : mp[x]) {
    if (vis[i]) continue;
    if (i == x || par[i] != -1)
      par[i] = x, ans = x;
    else
      par[i] = x, ans = dfs(i);
    if (ans != -1) return ans;
  }
  vis[x] = 1, par[x] = -1;
  return ans;
}
void solve() {
  vis.assign(n, 0), par.assign(n, -1);
  mp.assign(n, vector<long long int>(0)), ans.clear();
  for (long long int i = 0; i <= n - 1; i++) {
    mp[i].push_back(i - a[i]);
  }
  long long int aa = -1, bb;
  for (long long int i = 0; i <= n - 1; i++) {
    if (!vis[i]) aa = dfs(i);
    if (aa != -1) break;
  }
  bb = aa;
  ans.push_back(aa);
  while (par[aa] != bb) {
    aa = par[aa], ans.push_back(aa);
  }
  return;
}
signed main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> t;
  while (t--) {
    cin >> n, a.resize(n);
    for (long long int i = 0; i <= n - 1; i++) cin >> a[i];
    solve();
    cout << ans.size() << "\n";
    for (long long int i = 0; i <= ans.size() - 1; i++) {
      cout << ans[i] + 1 << (i == ans.size() - 1 ? "\n" : " ");
    }
  }
  return 0;
}
