The Winter holiday will be here soon. Mr. Chanek wants to decorate his house's wall with ornaments. The wall can be represented as a binary string a of length n. His favorite nephew has another binary string b of length m (m ≤ n).

Mr. Chanek's nephew loves the non-negative integer k. His nephew wants exactly k occurrences of b as substrings in a. 

However, Mr. Chanek does not know the value of k. So, for each k (0 ≤ k ≤ n - m + 1), find the minimum number of elements in a that have to be changed such that there are exactly k occurrences of b in a.

A string s occurs exactly k times in t if there are exactly k different pairs (p,q) such that we can obtain s by deleting p characters from the beginning and q characters from the end of t.

Input

The first line contains two integers n and m (1 ≤ m ≤ n ≤ 500) — size of the binary string a and b respectively.

The second line contains a binary string a of length n.

The third line contains a binary string b of length m.

Output

Output n - m + 2 integers — the (k+1)-th integer denotes the minimal number of elements in a that have to be changed so there are exactly k occurrences of b as a substring in a.

Example

Input


9 3
100101011
101


Output


1 1 0 1 6 -1 -1 -1

Note

For k = 0, to make the string a have no occurrence of 101, you can do one character change as follows.

100101011 → 100100011

For k = 1, you can also change a single character.

100101011 → 100001011

For k = 2, no changes are needed.
#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <class T, class S>
ostream &operator<<(ostream &o, const pair<T, S> &p) {
  return o << '(' << p.first << ", " << p.second << ')';
}
template <template <class, class...> class T, class... A>
typename enable_if<!is_same<T<A...>, string>(), ostream &>::type operator<<(
    ostream &o, T<A...> V) {
  o << '[';
  for (auto a : V) o << a << ", ";
  return o << ']';
}
string s, t;
int n, m, lc = 0, dp[501][501][501], lcp[501];
int r(int i, int k, int l) {
  if (l == m) k--, l = lc;
  if (i >= n) return dp[i][k][l] = k ? 1000000007 : 0;
  if (~dp[i][k][l]) return dp[i][k][l];
  int cx = s[i] == t[l] ? 0 : 1;
  dp[i][k][l] = min(r(i + 1, k, l + 1) + cx, r(i + 1, k, lcp[l]) + 1 - cx);
  return dp[i][k][l] = min(1000000007, dp[i][k][l]);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  memset(dp, -1, sizeof dp);
  cin >> n >> m >> s >> t;
  for (int j = 1; j < (m); ++j) {
    bool ok = true;
    for (int k = 0; k < (m - j); ++k)
      if (t[k] - t[j + k]) ok = false;
    if (ok) lc = max(lc, m - j);
  }
  for (int l = 0; l < (m); ++l) {
    string q = t.substr(0, l) + (t[l] == '0' ? "1" : "0");
    for (int j = 0; j < (q.size()); ++j) {
      bool ok = true;
      for (int k = 0; k < (j); ++k)
        if (t[k] - q[q.size() - j + k]) ok = false;
      if (ok) lcp[l] = max(lcp[l], j);
    }
  }
  for (int i = 0; i < (n - m + 2); ++i) {
    int ans = r(0, i, 0);
    cout << (ans >= 1000000007 ? -1 : ans) << ' ';
  }
  cout << '\n';
}
