#include <bits/stdc++.h>
using namespace std;
int pasi[200005];
vector<int> preprocess(string X) {
  int m = X.size();
  vector<int> arr(m + 1, 0);
  int i = 0, j = -1;
  arr[i] = j;
  while (i < m) {
    while (j >= 0 && X[i] != X[j]) j = arr[j];
    i++;
    j++;
    arr[i] = j;
  }
  return arr;
}
void KMP(string A, string B) {
  vector<int> arr = preprocess(A);
  int n = B.size();
  int m = A.size();
  int i = 0, j = 0;
  while (i < n) {
    while (j >= 0 && B[i] != A[j]) j = arr[j];
    i++;
    j++;
    if (j == m) {
      pasi[i - j]++;
      j = arr[j];
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int a, b;
  cin >> a >> b;
  string A, B;
  cin >> A >> B;
  set<char> S;
  for (int i = 0; i < B.size(); i++) S.insert(B[i]);
  for (set<char>::iterator it = S.begin(); it != S.end(); it++) {
    char c1 = (*it);
    for (char c2 = 'a'; c2 <= 'z'; c2++) {
      string tmpA = A;
      string tmpB = B;
      for (int i = 0; i < a; i++) {
        if (tmpA[i] == c1)
          tmpA[i] = c2;
        else if (tmpA[i] == c2)
          tmpA[i] = c1;
        else if (tmpA[i] != c1 && tmpA[i] != c2)
          tmpA[i] = '?';
        if (i < b && tmpB[i] != c1 && tmpB[i] != c2) tmpB[i] = '?';
      }
      KMP(tmpB, tmpA);
    }
  }
  int cnt = 0;
  for (int i = 0; i < A.size(); i++) {
    if (pasi[i] == S.size()) cnt++;
  }
  cout << cnt << endl;
  for (int i = 0; i < A.size(); i++) {
    if (pasi[i] == S.size()) cout << i + 1 << " ";
  }
  cout << endl;
}
