#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int cnt[maxn], a[maxn], n, q;
signed main() {
  scanf("%d", &q);
  while (q--) {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      cnt[i] = 0;
    }
    vector<int> res;
    for (int i = 1; cnt[i] < 3; i -= a[i])
      if ((++cnt[i]) == 2)
        res.push_back(i);
      else if (cnt[i] == 3)
        break;
    printf("%d\n", (int)res.size());
    for (int u : res) printf("%d ", u);
    printf("\n");
  }
  return 0;
}
