description: Theofanis has a string s_1 s_2 ... s_n and a character c. He wants to make all characters of the string equal to c using the minimum number of operations.
  
  In one operation he can choose a number x (1 ≤ x ≤ n) and for every position i, where i is not divisible by x, replace s_i with c. 
  
  Find the minimum number of operations required to make all the characters equal to c and the x-s that he should use in his operations.
  
  Input
  
  The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of test cases.
  
  The first line of each test case contains the integer n (3 ≤ n ≤ 3 ⋅ 10^5) and a lowercase Latin letter c — the length of the string s and the character the resulting string should consist of.
  
  The second line of each test case contains a string s of lowercase Latin letters — the initial string.
  
  It is guaranteed that the sum of n over all test cases does not exceed 3 ⋅ 10^5.
  
  Output
  
  For each test case, firstly print one integer m — the minimum number of operations required to make all the characters equal to c.
  
  Next, print m integers x_1, x_2, ..., x_m (1 ≤ x_j ≤ n) — the x-s that should be used in the order they are given.
  
  It can be proved that under given constraints, an answer always exists. If there are multiple answers, print any.
  
  Example
  
  Input
  
  
  3
  4 a
  aaaa
  4 a
  baaa
  4 b
  bzyx
  
  
  Output
  
  
  0
  1
  2
  2 
  2 3
  
  Note
  
  Let's describe what happens in the third test case: 
  
    1. x_1 = 2: we choose all positions that are not divisible by 2 and replace them, i. e. bzyx → bzbx; 
    2. x_2 = 3: we choose all positions that are not divisible by 3 and replace them, i. e. bzbx → bbbb. 
solution: import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.io.PrintWriter;
  import java.util.HashSet;
  import java.util.StringTokenizer;
  
  public class C {
      private static final FastReader fs = new FastReader();
      private static final PrintWriter out = new PrintWriter(System.out);
      private static long m = 1_000_000_009;
      private static long p = 31;
      private static long mod = 1_000_000_007;
      private static long ool = 1_000_000_000_000_000_009l;
      private static int ooi = 1_000_000_009;
  
      private static void solve() {
          int n = fs.nextInt();
          char[] c = fs.next().toCharArray();
          char[] s = fs.next().toCharArray();
          HashSet<Integer> st = new HashSet<>();
          for(int i = 1; i <= n; i++)
              st.add(i);
          int count = 0;
          for(int i = 0; i < n; i++){
              if(s[i] != c[0]){
                  for(int j = 1; j * j <= (i+1); j++){
                      if((i+1) % j == 0){
                          if(st.contains(j))st.remove(j);
                          if(st.contains((i+1) / j)) st.remove((i+1) / j);
                      }
                  }
                  count += 1;
              }
          }
          if(count == 0) out.println(0);
          else if(st.size() > 0){
              out.println(1);
              for(int x : st){
                  out.println(x);
                  break;
              }
          }
          else{
              out.println(2 + "\n" + n + " " + (n-1));
          }
      }
  
      public static void main(String[] args) {
          Thread t = new Thread(null, null, "", 1 << 28) {
              public void run() {
                  int test_case = 1;
                  test_case = fs.nextInt();
                  for (int cs = 1; cs <= test_case; cs++)
                      solve();
                  out.close();
              }
          };
          t.start();
          try {
              t.join();
          } catch (InterruptedException e) {
              e.printStackTrace();
          }
      }
  
      private static class FastReader {
          BufferedReader br;
          StringTokenizer st;
  
          public FastReader() {
              br = new BufferedReader(new InputStreamReader(System.in));
          }
  
          String next() {
              while (st == null || !st.hasMoreElements()) {
                  try {
                      st = new StringTokenizer(br.readLine());
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
              return st.nextToken();
          }
  
          int nextInt() {
              return Integer.parseInt(next());
          }
  
          long nextLong() {
              return Long.parseLong(next());
          }
  
          double nextDouble() {
              return Double.parseDouble(next());
          }
  
          String nextLine() {
              String str = "";
              try {
                  str = br.readLine();
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return str;
          }
  
          int[] readintarray(int n) {
              int res[] = new int[n];
              for (int i = 0; i < n; i++)
                  res[i] = nextInt();
              return res;
          }
  
          long[] readlongarray(int n) {
              long res[] = new long[n];
              for (int i = 0; i < n; i++)
                  res[i] = nextLong();
              return res;
          }
      }
  
      private static int max(int... arg) {
          int length = arg.length;
          if(length == 0)
              throw null;
          int maxVal = arg[0];
          for(int i = 1; i < length; i++)
              maxVal = Math.max(maxVal, arg[i]);
          return maxVal;
      }
  
      private static int min(int... arg) {
          int length = arg.length;
          if(length == 0)
              throw null;
          int maxVal = arg[0];
          for(int i = 1; i < length; i++)
              maxVal = Math.min(maxVal, arg[i]);
          return maxVal;
      }
  
      private static long max(long... arg) {
          int length = arg.length;
          if(length == 0)
              throw null;
          long maxVal = arg[0];
          for(int i = 1; i < length; i++)
              maxVal = Math.max(maxVal, arg[i]);
          return maxVal;
      }
  
      private static long min(long... arg) {
          int length = arg.length;
          if(length == 0)
              throw null;
          long maxVal = arg[0];
          for(int i = 1; i < length; i++)
              maxVal = Math.min(maxVal, arg[i]);
          return maxVal;
      }
  
      private static int abs(int a) {
          return a >= 0 ? a : -a;
      }
  
      private static int abs(int a, int b) {
          return a-b >= 0 ? a-b : b-a;
      }
  
      private static long abs(long a) {
          return a >= 0 ? a : -a;
      }
  
      private static long abs(long a, long b) {
          return a-b >= 0 ? a-b : b-a;
      }
  
      private static int power(int base, int exponent) {
          int res = 1;
          while(exponent > 0) {
              if((exponent & 1) != 0)
                  res *= base;
              exponent >>= 1;
              base *= base;
          }
          return res;
      }
  
      private static long power(long base, long exponent) {
          long res = 1;
          while(exponent > 0) {
              if((exponent & 1) != 0)
                  res *= base;
              exponent >>= 1;
              base *= base;
          }
          return res;
      }
  
      private static long mPower(long base, long exponent) throws Exception {
          long res = 1;
          base %= mod;
          while(exponent > 0) {
              if((exponent & 1) != 0)
                  res = mul(res, base);
              exponent >>= 1;
              base = mul(base, base);
          }
          return res;
      }
  
      private static long mul(long a, long b) {
          return a*b % mod;
      }
  
      private static long add(long a, long b) {
          return (a+b) % mod;
      }
  
      private static long sub(long a, long b) {
          long res = (a - b) % mod;
          if(res < 0)
              res += mod;
          return res;
      }
  
      private static long xor(long n){
          long r = n % 4;
          if(r == 0)
              return n;
          else if(r == 1)
              return 1;
          else if(r == 2)
              return n+1;
          else
              return 0;
      }
  }