#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y) {
  long long int res = 1;
  while (y) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y / 2, x = (x * x) % 1000000007;
  }
  return res % 1000000007;
}
long long int binpower(long long int x, long long int y, long long int pp) {
  long long int res = 1;
  while (y) {
    if (y & 1) res = (res * x) % pp;
    y = y / 2, x = (x * x) % pp;
  }
  return res % pp;
}
long long int hash1[200001][26];
long long int hash2[200001][26];
long long int pwr1[200001];
long long int pwr2[200001];
long long int inv1[200001];
long long int inv2[200001];
long long int mod1 = 1e9 + 21;
long long int mod2 = 1e9 + 9;
vector<long long int> fin;
void hashing(string s) {
  long long int p1 = 31;
  long long int p2 = 43;
  long long int i;
  pwr1[0] = 1;
  pwr2[0] = 1;
  for (i = 1; i <= s.length(); i++) {
    pwr1[i] = (p1 * pwr1[i - 1]) % mod1;
    pwr2[i] = (p2 * pwr2[i - 1]) % mod2;
  }
  for (i = 0; i <= s.length(); i++) {
    inv1[i] = binpower(pwr1[i], mod1 - 2, mod1);
    inv2[i] = binpower(pwr2[i], mod2 - 2, mod2);
  }
  for (i = 0; i <= 200000; i++) {
    for (long long int j = 0; j < 26; j++) {
      hash1[i][j] = 0;
      hash2[i][j] = 0;
    }
  }
  for (i = 0; i < s.length(); i++) {
    hash1[i + 1][s[i] - 'a'] = pwr1[i];
    hash2[i + 1][s[i] - 'a'] = pwr2[i];
    for (long long int j = 0; j < 26; j++) {
      hash1[i + 1][j] += hash1[i][j];
      hash2[i + 1][j] += hash2[i][j];
      hash1[i + 1][j] %= mod1;
      hash2[i + 1][j] %= mod2;
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  long long int i;
  string s, t;
  cin >> s >> t;
  hashing(t);
  vector<pair<pair<long long int, long long int>, long long int> > arr;
  for (i = 0; i < 26; i++)
    arr.push_back(make_pair(make_pair(hash1[m][i], hash2[m][i]), i));
  sort(arr.begin(), arr.end());
  reverse(arr.begin(), arr.end());
  long long int ans = 0;
  hashing(s);
  for (long long int j = 1; j <= n - m + 1; j++) {
    long long int x, l;
    x = j;
    l = m;
    vector<pair<pair<long long int, long long int>, long long int> > temp1;
    long long int freq[26];
    for (i = 0; i < 26; i++) {
      freq[i] = -1;
      temp1.push_back(
          make_pair(make_pair((hash1[x + l - 1][i] - hash1[x - 1][i] + mod1) %
                                  mod1 * inv1[x - 1] % mod1,
                              (hash2[x + l - 1][i] - hash2[x - 1][i] + mod2) %
                                  mod2 * inv2[x - 1] % mod2),
                    i));
    }
    sort(temp1.begin(), temp1.end());
    reverse(temp1.begin(), temp1.end());
    vector<pair<pair<long long int, long long int>, long long int> > temp2 =
        arr;
    bool poss = true;
    long long int cnt = 0;
    while (cnt < 26) {
      pair<pair<long long int, long long int>, long long int> sad = temp1[cnt];
      pair<pair<long long int, long long int>, long long int> hola = temp2[cnt];
      if (sad.first.first == 0 and hola.first.first == 0 and
          sad.first.second == 0 and hola.first.second == 0)
        break;
      if (sad.first.first == hola.first.first and
          sad.first.second == hola.first.second) {
        if (freq[sad.second] == -1 and freq[hola.second] == -1)
          freq[sad.second] = hola.second, freq[hola.second] = sad.second;
        else if (freq[sad.second] != hola.second or
                 freq[hola.second] != sad.second) {
          poss = false;
          break;
        }
      } else {
        poss = false;
        break;
      }
      cnt++;
    }
    if (poss) ans++, fin.push_back(j);
  }
  cout << ans << "\n";
  for (i = 0; i < ans; i++) cout << fin[i] << " ";
}

### Prompt

Generate a CPP solution to 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;
long long int power(long long int x, long long int y) {
  long long int res = 1;
  while (y) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y / 2, x = (x * x) % 1000000007;
  }
  return res % 1000000007;
}
long long int binpower(long long int x, long long int y, long long int pp) {
  long long int res = 1;
  while (y) {
    if (y & 1) res = (res * x) % pp;
    y = y / 2, x = (x * x) % pp;
  }
  return res % pp;
}
long long int hash1[200001][26];
long long int hash2[200001][26];
long long int pwr1[200001];
long long int pwr2[200001];
long long int inv1[200001];
long long int inv2[200001];
long long int mod1 = 1e9 + 21;
long long int mod2 = 1e9 + 9;
vector<long long int> fin;
void hashing(string s) {
  long long int p1 = 31;
  long long int p2 = 43;
  long long int i;
  pwr1[0] = 1;
  pwr2[0] = 1;
  for (i = 1; i <= s.length(); i++) {
    pwr1[i] = (p1 * pwr1[i - 1]) % mod1;
    pwr2[i] = (p2 * pwr2[i - 1]) % mod2;
  }
  for (i = 0; i <= s.length(); i++) {
    inv1[i] = binpower(pwr1[i], mod1 - 2, mod1);
    inv2[i] = binpower(pwr2[i], mod2 - 2, mod2);
  }
  for (i = 0; i <= 200000; i++) {
    for (long long int j = 0; j < 26; j++) {
      hash1[i][j] = 0;
      hash2[i][j] = 0;
    }
  }
  for (i = 0; i < s.length(); i++) {
    hash1[i + 1][s[i] - 'a'] = pwr1[i];
    hash2[i + 1][s[i] - 'a'] = pwr2[i];
    for (long long int j = 0; j < 26; j++) {
      hash1[i + 1][j] += hash1[i][j];
      hash2[i + 1][j] += hash2[i][j];
      hash1[i + 1][j] %= mod1;
      hash2[i + 1][j] %= mod2;
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  long long int i;
  string s, t;
  cin >> s >> t;
  hashing(t);
  vector<pair<pair<long long int, long long int>, long long int> > arr;
  for (i = 0; i < 26; i++)
    arr.push_back(make_pair(make_pair(hash1[m][i], hash2[m][i]), i));
  sort(arr.begin(), arr.end());
  reverse(arr.begin(), arr.end());
  long long int ans = 0;
  hashing(s);
  for (long long int j = 1; j <= n - m + 1; j++) {
    long long int x, l;
    x = j;
    l = m;
    vector<pair<pair<long long int, long long int>, long long int> > temp1;
    long long int freq[26];
    for (i = 0; i < 26; i++) {
      freq[i] = -1;
      temp1.push_back(
          make_pair(make_pair((hash1[x + l - 1][i] - hash1[x - 1][i] + mod1) %
                                  mod1 * inv1[x - 1] % mod1,
                              (hash2[x + l - 1][i] - hash2[x - 1][i] + mod2) %
                                  mod2 * inv2[x - 1] % mod2),
                    i));
    }
    sort(temp1.begin(), temp1.end());
    reverse(temp1.begin(), temp1.end());
    vector<pair<pair<long long int, long long int>, long long int> > temp2 =
        arr;
    bool poss = true;
    long long int cnt = 0;
    while (cnt < 26) {
      pair<pair<long long int, long long int>, long long int> sad = temp1[cnt];
      pair<pair<long long int, long long int>, long long int> hola = temp2[cnt];
      if (sad.first.first == 0 and hola.first.first == 0 and
          sad.first.second == 0 and hola.first.second == 0)
        break;
      if (sad.first.first == hola.first.first and
          sad.first.second == hola.first.second) {
        if (freq[sad.second] == -1 and freq[hola.second] == -1)
          freq[sad.second] = hola.second, freq[hola.second] = sad.second;
        else if (freq[sad.second] != hola.second or
                 freq[hola.second] != sad.second) {
          poss = false;
          break;
        }
      } else {
        poss = false;
        break;
      }
      cnt++;
    }
    if (poss) ans++, fin.push_back(j);
  }
  cout << ans << "\n";
  for (i = 0; i < ans; i++) cout << fin[i] << " ";
}

```