#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int INF = 2e9 + 9;
const long long INF1 = 1e18 + 9;
const long long MAXN = 2e5 + 7;
const long long MAXN1 = 1 << 11;
const long long MAXN2 = 4e6 + 9;
const long long MOD = 998244353;
const long long MOD1 = 1e9 + 9;
const long long ALPH = 50;
const long long PW1 = 239;
const long long PW2 = 199;
const long long PW3 = 193;
const long long PW4 = 117;
const long double EPS = 1e-9;
const long long BLOCK = 3684;
const long long BLOCK1 = 1 << 9;
void solve();
signed main() {
  srand('a' + 'l' + 'e' + 'x' + 'X' + '5' + '1' + '2');
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  if (0) cin >> q;
  while (q--) solve();
}
bool correct[26][26][MAXN];
int zf[MAXN * 2], z[2 * MAXN];
void solve() {
  int n, m;
  string s, t;
  cin >> n >> m >> s >> t;
  int k = n + m + 1;
  for (int i = 0; i < m; ++i) z[i] = t[i] - 'a';
  z[m] = -1;
  for (int i = 0; i < n; ++i) z[m + i + 1] = s[i] - 'a';
  for (int i = 0; i < 26; ++i) {
    for (int j = 0; j < 26; ++j) {
      for (int r = 0, l = 0, q = 1; q < k; ++q) {
        zf[q] = 0;
        if (q <= r) {
          zf[q] = min(r - q + 1, zf[q - l]);
        }
        while (q + zf[q] < k && zf[q] < m &&
               (z[q + zf[q]] == (q + zf[q] >= m ? i : j) &&
                    z[zf[q]] == (zf[q] >= m ? i : j) ||
                z[q + zf[q]] != (q + zf[q] >= m ? i : j) &&
                    z[zf[q]] != (zf[q] >= m ? i : j))) {
          ++zf[q];
        }
        if (q + zf[q] - 1 > r) {
          r = q + zf[q] - 1;
          l = q;
        }
      }
      for (int q = 0; q < n; ++q) {
        correct[i][j][q] = zf[m + q + 1] == m;
      }
    }
  }
  vector<int> ind(26, -1), ans;
  vector<set<int>> in(26);
  for (int i = m - 1; i >= 0; --i) {
    ind[z[i]] = i;
  }
  for (int i = 0; i + m <= n; ++i) {
    bool b = 1;
    for (int j = 0; j < 26; ++j) {
      if (ind[j] != -1) {
        if (!correct[z[m + 1 + i + ind[j]]][j][i]) b = 0;
        in[z[m + 1 + i + ind[j]]].emplace(j);
        in[j].emplace(z[m + 1 + i + ind[j]]);
      }
    }
    for (int j = 0; j < 26; ++j) {
      if (in[j].size() > 1) b = 0;
      in[j].clear();
    }
    if (b) ans.emplace_back(i + 1);
  }
  cout << ans.size() << "\n";
  for (auto &i : ans) cout << i << " ";
}

### Prompt

Develop a solution in cpp to the problem described below:

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>
#pragma GCC optimize("Ofast")
using namespace std;
const int INF = 2e9 + 9;
const long long INF1 = 1e18 + 9;
const long long MAXN = 2e5 + 7;
const long long MAXN1 = 1 << 11;
const long long MAXN2 = 4e6 + 9;
const long long MOD = 998244353;
const long long MOD1 = 1e9 + 9;
const long long ALPH = 50;
const long long PW1 = 239;
const long long PW2 = 199;
const long long PW3 = 193;
const long long PW4 = 117;
const long double EPS = 1e-9;
const long long BLOCK = 3684;
const long long BLOCK1 = 1 << 9;
void solve();
signed main() {
  srand('a' + 'l' + 'e' + 'x' + 'X' + '5' + '1' + '2');
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  if (0) cin >> q;
  while (q--) solve();
}
bool correct[26][26][MAXN];
int zf[MAXN * 2], z[2 * MAXN];
void solve() {
  int n, m;
  string s, t;
  cin >> n >> m >> s >> t;
  int k = n + m + 1;
  for (int i = 0; i < m; ++i) z[i] = t[i] - 'a';
  z[m] = -1;
  for (int i = 0; i < n; ++i) z[m + i + 1] = s[i] - 'a';
  for (int i = 0; i < 26; ++i) {
    for (int j = 0; j < 26; ++j) {
      for (int r = 0, l = 0, q = 1; q < k; ++q) {
        zf[q] = 0;
        if (q <= r) {
          zf[q] = min(r - q + 1, zf[q - l]);
        }
        while (q + zf[q] < k && zf[q] < m &&
               (z[q + zf[q]] == (q + zf[q] >= m ? i : j) &&
                    z[zf[q]] == (zf[q] >= m ? i : j) ||
                z[q + zf[q]] != (q + zf[q] >= m ? i : j) &&
                    z[zf[q]] != (zf[q] >= m ? i : j))) {
          ++zf[q];
        }
        if (q + zf[q] - 1 > r) {
          r = q + zf[q] - 1;
          l = q;
        }
      }
      for (int q = 0; q < n; ++q) {
        correct[i][j][q] = zf[m + q + 1] == m;
      }
    }
  }
  vector<int> ind(26, -1), ans;
  vector<set<int>> in(26);
  for (int i = m - 1; i >= 0; --i) {
    ind[z[i]] = i;
  }
  for (int i = 0; i + m <= n; ++i) {
    bool b = 1;
    for (int j = 0; j < 26; ++j) {
      if (ind[j] != -1) {
        if (!correct[z[m + 1 + i + ind[j]]][j][i]) b = 0;
        in[z[m + 1 + i + ind[j]]].emplace(j);
        in[j].emplace(z[m + 1 + i + ind[j]]);
      }
    }
    for (int j = 0; j < 26; ++j) {
      if (in[j].size() > 1) b = 0;
      in[j].clear();
    }
    if (b) ans.emplace_back(i + 1);
  }
  cout << ans.size() << "\n";
  for (auto &i : ans) cout << i << " ";
}

```