#include <bits/stdc++.h>
using namespace std;
template <typename T>
T BigMod(T b, T p, T m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    T s = BigMod(b, p / 2, m);
    return ((s % m) * (s % m)) % m;
  }
  return ((b % m) * (BigMod(b, p - 1, m) % m)) % m;
}
template <typename T>
T ModInv(T b, T m) {
  return BigMod(b, m - 2, m);
}
template <typename T>
T in() {
  char ch;
  T n = 0;
  bool ng = false;
  while (1) {
    ch = getchar();
    if (ch == '-') {
      ng = true;
      ch = getchar();
      break;
    }
    if (ch >= '0' && ch <= '9') break;
  }
  while (1) {
    n = n * 10 + (ch - '0');
    ch = getchar();
    if (ch < '0' || ch > '9') break;
  }
  return (ng ? -n : n);
}
template <typename T>
T POW(T B, T printf) {
  if (printf == 0) return 1;
  if (printf & 1)
    return B * POW(B, printf - 1);
  else
    return (POW(B, printf / 2) * POW(B, printf / 2));
}
template <typename T>
T Bigmod(T b, T p, T m) {
  if (p == 0)
    return 1;
  else if (!(p & 1))
    return (Bigmod(b, p / 2, m) * Bigmod(b, p / 2, m)) % m;
  else
    return ((b % m) * Bigmod(b, p - 1, m)) % m;
}
template <typename T>
T Dis(T x1, T y1, T x2, T y2) {
  return sqrt((x1 - x2 * x1 - x2) + (y1 - y2 * y1 - y2));
}
template <typename T>
T Angle(T x1, T y1, T x2, T y2) {
  return atan(double(y1 - y2) / double(x1 - x2));
}
template <typename T>
T DIFF(T a, T b) {
  T d = a - b;
  if (d < 0)
    return -d;
  else
    return d;
}
template <typename T>
T ABS(T a) {
  if (a < 0)
    return -a;
  else
    return a;
}
template <typename T>
T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
template <typename T>
T euclide(T a, T b, T &x, T &y) {
  if (a < 0) {
    T d = euclide(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = euclide(a, -b, x, y);
    y = -y;
    return d;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = euclide(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
template <typename T>
void ia(T a[], int n) {
  for (int i = 0; i < n; i++) cin >> a[i];
}
template <typename T>
void pa(T a[], int n) {
  for (int i = 0; i < n - 1; i++) cout << a[i] << " ";
  cout << a[n - 1] << endl;
}
template <typename T>
long long int isLeft(T a, T b, T c) {
  return (a.x - b.x) * (b.y - c.y) - (b.x - c.x) * (a.y - b.y);
}
int Set(int N, int pos) { return N = N | (1 << pos); }
int Reset(int N, int pos) { return N = N & ~(1 << pos); }
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
template <class T, class first>
inline T togglebit(T a, first i) {
  T t = 1;
  return (a ^ (t << i));
}
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int toLlint(string s) {
  long long int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int cdigittoint(char ch) { return ch - '0'; }
bool isVowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
bool isConst(char ch) {
  if (isalpha(ch) && !isVowel(ch)) return true;
  return false;
}
double DEG(double x) { return (180.0 * x) / (2.0 * acos(0.0)); }
double RAD(double x) { return (x * (double)2.0 * acos(0.0)) / (180.0); }
pair<unsigned long long int, unsigned long long int> H[26][200007];
pair<unsigned long long int, unsigned long long int> F[26];
bool a[2][26][200007];
unsigned long long int B1[200007], B2[200007];
char s[200007], t[200007];
bool vis[28];
int ans[200007], L;
void Init() {
  B1[0] = B2[0] = 1;
  for (int i = 1; i < 200007; i++) {
    B1[i] = B1[i - 1] * 10000019ULL;
    B2[i] = B2[i - 1] * 10000079ULL;
  }
}
pair<unsigned long long int, unsigned long long int> SubStr(int f, int l,
                                                            int r) {
  int len = r - l + 1;
  pair<unsigned long long int, unsigned long long int> ans;
  ans.first = H[f][r].first - H[f][l - 1].first * B1[len];
  ans.second = H[f][r].second - H[f][l - 1].second * B2[len];
  return ans;
}
int main() {
  Init();
  int n, m;
  scanf("%d%d", &n, &m);
  scanf("%s%s", s + 1, t + 1);
  for (int i = 1; i <= n; i++) a[0][s[i] - 'a'][i] = 1;
  for (int i = 1; i <= m; i++) a[1][t[i] - 'a'][i] = 1;
  for (int i = 0; i < 26; i++) {
    for (int j = 1; j <= n; j++) {
      H[i][j].first = H[i][j - 1].first * 10000019ULL + (a[0][i][j]) + 1;
      H[i][j].second = H[i][j - 1].second * 10000079ULL + (a[0][i][j]) + 1;
    }
  }
  for (int i = 0; i < 26; i++) {
    for (int j = 1; j <= m; j++) {
      F[i].first = F[i].first * 10000019ULL + (a[1][i][j]) + 1;
      F[i].second = F[i].second * 10000079ULL + (a[1][i][j]) + 1;
    }
  }
  for (int i = 1; i <= n - m + 1; i++) {
    for (int j = 0; j < 26; j++) vis[j] = 0;
    for (int j = 0; j < 26; j++) {
      if (vis[j]) continue;
      pair<unsigned long long int, unsigned long long int> x =
          SubStr(j, i, i + m - 1);
      if (x == F[j])
        vis[j] = 1;
      else {
        for (int k = 0; k < 26; k++) {
          if (vis[k]) continue;
          pair<unsigned long long int, unsigned long long int> xx =
              SubStr(j, i, i + m - 1);
          pair<unsigned long long int, unsigned long long int> yy =
              SubStr(k, i, i + m - 1);
          if (xx == F[k] && yy == F[j]) {
            vis[j] = vis[k] = 1;
            break;
          }
        }
      }
    }
    int cnt = 0;
    for (int j = 0; j < 26; j++) cnt += vis[j];
    if (cnt == 26) ans[++L] = i;
  }
  printf("%d\n", L);
  for (int i = 1; i <= L; i++) printf("%d%c", ans[i], i == L ? '\n' : ' ');
  return 0;
}

### Prompt

In Cpp, your task is to solve the following problem:

Polycarp invented a new way to encode strings. Let's assume that we have string T, consisting of lowercase English letters. Let's choose several pairs of letters of the English alphabet in such a way that each letter occurs in at most one pair. Then let's replace each letter in T with its pair letter if there is a pair letter for it. For example, if you chose pairs (l, r), (p, q) and (a, o), then word "parallelogram" according to the given encoding principle transforms to word "qolorreraglom".

Polycarpus already has two strings, S and T. He suspects that string T was obtained after applying the given encoding method from some substring of string S. Find all positions mi in S (1 ≤ mi ≤ |S| - |T| + 1), such that T can be obtained fro substring SmiSmi + 1... Smi + |T| - 1 by applying the described encoding operation by using some set of pairs of English alphabet letters

Input

The first line of the input contains two integers, |S| and |T| (1 ≤ |T| ≤ |S| ≤ 2·105) — the lengths of string S and string T, respectively.

The second and third line of the input contain strings S and T, respectively. Both strings consist only of lowercase English letters.

Output

Print number k — the number of suitable positions in string S.

In the next line print k integers m1, m2, ..., mk — the numbers of the suitable positions in the increasing order.

Examples

Input

11 5
abacabadaba
acaba


Output

3
1 3 7


Input

21 13
paraparallelogramgram
qolorreraglom


Output

1
5

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template <typename T>
T BigMod(T b, T p, T m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    T s = BigMod(b, p / 2, m);
    return ((s % m) * (s % m)) % m;
  }
  return ((b % m) * (BigMod(b, p - 1, m) % m)) % m;
}
template <typename T>
T ModInv(T b, T m) {
  return BigMod(b, m - 2, m);
}
template <typename T>
T in() {
  char ch;
  T n = 0;
  bool ng = false;
  while (1) {
    ch = getchar();
    if (ch == '-') {
      ng = true;
      ch = getchar();
      break;
    }
    if (ch >= '0' && ch <= '9') break;
  }
  while (1) {
    n = n * 10 + (ch - '0');
    ch = getchar();
    if (ch < '0' || ch > '9') break;
  }
  return (ng ? -n : n);
}
template <typename T>
T POW(T B, T printf) {
  if (printf == 0) return 1;
  if (printf & 1)
    return B * POW(B, printf - 1);
  else
    return (POW(B, printf / 2) * POW(B, printf / 2));
}
template <typename T>
T Bigmod(T b, T p, T m) {
  if (p == 0)
    return 1;
  else if (!(p & 1))
    return (Bigmod(b, p / 2, m) * Bigmod(b, p / 2, m)) % m;
  else
    return ((b % m) * Bigmod(b, p - 1, m)) % m;
}
template <typename T>
T Dis(T x1, T y1, T x2, T y2) {
  return sqrt((x1 - x2 * x1 - x2) + (y1 - y2 * y1 - y2));
}
template <typename T>
T Angle(T x1, T y1, T x2, T y2) {
  return atan(double(y1 - y2) / double(x1 - x2));
}
template <typename T>
T DIFF(T a, T b) {
  T d = a - b;
  if (d < 0)
    return -d;
  else
    return d;
}
template <typename T>
T ABS(T a) {
  if (a < 0)
    return -a;
  else
    return a;
}
template <typename T>
T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
template <typename T>
T euclide(T a, T b, T &x, T &y) {
  if (a < 0) {
    T d = euclide(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = euclide(a, -b, x, y);
    y = -y;
    return d;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = euclide(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
template <typename T>
void ia(T a[], int n) {
  for (int i = 0; i < n; i++) cin >> a[i];
}
template <typename T>
void pa(T a[], int n) {
  for (int i = 0; i < n - 1; i++) cout << a[i] << " ";
  cout << a[n - 1] << endl;
}
template <typename T>
long long int isLeft(T a, T b, T c) {
  return (a.x - b.x) * (b.y - c.y) - (b.x - c.x) * (a.y - b.y);
}
int Set(int N, int pos) { return N = N | (1 << pos); }
int Reset(int N, int pos) { return N = N & ~(1 << pos); }
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
template <class T, class first>
inline T togglebit(T a, first i) {
  T t = 1;
  return (a ^ (t << i));
}
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int toLlint(string s) {
  long long int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
int cdigittoint(char ch) { return ch - '0'; }
bool isVowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
bool isConst(char ch) {
  if (isalpha(ch) && !isVowel(ch)) return true;
  return false;
}
double DEG(double x) { return (180.0 * x) / (2.0 * acos(0.0)); }
double RAD(double x) { return (x * (double)2.0 * acos(0.0)) / (180.0); }
pair<unsigned long long int, unsigned long long int> H[26][200007];
pair<unsigned long long int, unsigned long long int> F[26];
bool a[2][26][200007];
unsigned long long int B1[200007], B2[200007];
char s[200007], t[200007];
bool vis[28];
int ans[200007], L;
void Init() {
  B1[0] = B2[0] = 1;
  for (int i = 1; i < 200007; i++) {
    B1[i] = B1[i - 1] * 10000019ULL;
    B2[i] = B2[i - 1] * 10000079ULL;
  }
}
pair<unsigned long long int, unsigned long long int> SubStr(int f, int l,
                                                            int r) {
  int len = r - l + 1;
  pair<unsigned long long int, unsigned long long int> ans;
  ans.first = H[f][r].first - H[f][l - 1].first * B1[len];
  ans.second = H[f][r].second - H[f][l - 1].second * B2[len];
  return ans;
}
int main() {
  Init();
  int n, m;
  scanf("%d%d", &n, &m);
  scanf("%s%s", s + 1, t + 1);
  for (int i = 1; i <= n; i++) a[0][s[i] - 'a'][i] = 1;
  for (int i = 1; i <= m; i++) a[1][t[i] - 'a'][i] = 1;
  for (int i = 0; i < 26; i++) {
    for (int j = 1; j <= n; j++) {
      H[i][j].first = H[i][j - 1].first * 10000019ULL + (a[0][i][j]) + 1;
      H[i][j].second = H[i][j - 1].second * 10000079ULL + (a[0][i][j]) + 1;
    }
  }
  for (int i = 0; i < 26; i++) {
    for (int j = 1; j <= m; j++) {
      F[i].first = F[i].first * 10000019ULL + (a[1][i][j]) + 1;
      F[i].second = F[i].second * 10000079ULL + (a[1][i][j]) + 1;
    }
  }
  for (int i = 1; i <= n - m + 1; i++) {
    for (int j = 0; j < 26; j++) vis[j] = 0;
    for (int j = 0; j < 26; j++) {
      if (vis[j]) continue;
      pair<unsigned long long int, unsigned long long int> x =
          SubStr(j, i, i + m - 1);
      if (x == F[j])
        vis[j] = 1;
      else {
        for (int k = 0; k < 26; k++) {
          if (vis[k]) continue;
          pair<unsigned long long int, unsigned long long int> xx =
              SubStr(j, i, i + m - 1);
          pair<unsigned long long int, unsigned long long int> yy =
              SubStr(k, i, i + m - 1);
          if (xx == F[k] && yy == F[j]) {
            vis[j] = vis[k] = 1;
            break;
          }
        }
      }
    }
    int cnt = 0;
    for (int j = 0; j < 26; j++) cnt += vis[j];
    if (cnt == 26) ans[++L] = i;
  }
  printf("%d\n", L);
  for (int i = 1; i <= L; i++) printf("%d%c", ans[i], i == L ? '\n' : ' ');
  return 0;
}

```