Dreamoon has a string s and a pattern string p. He first removes exactly x characters from s obtaining string s' as a result. Then he calculates <image> that is defined as the maximal number of non-overlapping substrings equal to p that can be found in s'. He wants to make this number as big as possible.

More formally, let's define <image> as maximum value of <image> over all s' that can be obtained by removing exactly x characters from s. Dreamoon wants to know <image> for all x from 0 to |s| where |s| denotes the length of string s.

Input

The first line of the input contains the string s (1 ≤ |s| ≤ 2 000).

The second line of the input contains the string p (1 ≤ |p| ≤ 500).

Both strings will only consist of lower case English letters.

Output

Print |s| + 1 space-separated integers in a single line representing the <image> for all x from 0 to |s|.

Examples

Input

aaaaa
aa


Output

2 2 1 1 0 0


Input

axbaxxb
ab


Output

0 1 1 2 1 1 0 0

Note

For the first sample, the corresponding optimal values of s' after removal 0 through |s| = 5 characters from s are {"aaaaa", "aaaa", "aaa", "aa", "a", ""}. 

For the second sample, possible corresponding optimal values of s' are {"axbaxxb", "abaxxb", "axbab", "abab", "aba", "ab", "a", ""}.
#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
const int maxn = 18;
const int maxm = 110;
const int maxmask = (1 << maxn) - 1;
const int infi = 1e9 + 7;
const long long infl = 1e18;
const long double eps = 1e-8;
const long long mod1 = 1e9 + 7;
const long long mod2 = 1e9 + 9;
string ar, arz;
int strnext[100500];
int strback[100500];
int dp[2010][2010];
int min1[100500];
int min1n[100500];
int ans[100500];
int main() {
  cin >> ar >> arz;
  for (int i = 0; i < ar.size(); ++i) {
    int q = 0, w = infi;
    for (int j = 0; j + i < ar.size() && q < arz.size(); ++j) {
      if (ar[i + j] == arz[q]) {
        ++q;
      }
      w = j + i;
    }
    if (q == arz.size()) {
      strnext[i] = w;
    } else {
      strnext[i] = infi;
    }
  }
  for (int i = 0; i < (int)arz.size() - 1; ++i) {
    strback[i] = infi;
  }
  for (int i = arz.size() - 1; i < ar.size(); ++i) {
    int q = 0, w = 0;
    for (int j = 0; i - j >= 0 && (int)arz.size() - q - 1 >= 0; ++j) {
      if (ar[i - j] == arz[arz.size() - q - 1]) {
        ++q;
      } else {
        ++w;
      }
    }
    if (arz.size() == q) {
      strback[i] = w;
    } else {
      strback[i] = infi;
    }
  }
  min1[ar.size()] = infi;
  for (int i = 1; i <= ar.size(); ++i) {
    ans[i] = infi;
  }
  strnext[ar.size()] = infi;
  for (int i = 1; i * arz.size() <= ar.size(); ++i) {
    for (int j = 0; j < ar.size(); ++j) {
      if (i == 1) {
        dp[i][j] = strback[j];
      } else {
        int to = strnext[j + 1];
        if (to < ar.size()) {
          dp[i][j] = min1[to] + strback[j];
        } else {
          dp[i][j] = infi;
        }
      }
      ans[i] = min(ans[i], dp[i][j]);
    }
    for (int j = ar.size() - 1; j >= 0; --j) {
      min1[j] = min(min1[j + 1], dp[i][j]);
    }
  }
  for (int x = 0; x <= ar.size(); ++x) {
    int ans1 = 0;
    for (int i = 1; i * arz.size() + x <= ar.size(); ++i) {
      if (ans[i] <= x) {
        ans1 = i;
      }
    }
    cout << ans1 << ' ';
  }
  return 0;
}
