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;
inline int read() {
  int ret;
  scanf("%d", &ret);
  return ret;
}
string s, p;
int dp[2222][2222];
int n, m;
int change[2222][30];
void makechange() {
  memset(change, -1, sizeof change);
  static int last[2222];
  memset(last, -1, sizeof last);
  for (int i = 0; i < int(n); i++) {
    for (int j = 0; j < int(26); j++) {
      change[i][j] = last[j];
    }
    last[s[i] - 'a'] = i;
  }
}
int ans[2222];
int least[2222];
int Main() {
  ios_base::sync_with_stdio(0);
  cin >> s >> p;
  n = s.length();
  m = p.length();
  makechange();
  int z = n / m;
  for (int i = 0; i < int(z + 1); i++) least[i] = 0XFFFFFFF;
  for (int i = 0; i < int(2222); i++)
    for (int j = 0; j < int(2222); j++) dp[i][j] = 0XFFFFFFF;
  for (int j = 0; j < int(z + 1); j++) {
    for (int i = 0; i < int(n); i++) {
      if (j == 0)
        dp[i][j] = 0;
      else {
        if (i > 0) dp[i][j] = dp[i - 1][j];
        int p1 = i;
        int p2 = m - 1;
        int cnt = 0;
        bool flag = true;
        while (p2 >= 0) {
          if (p1 < 0) {
            flag = false;
            break;
          }
          if (s[p1] == p[p2]) {
            p1--;
            p2--;
          } else {
            int pre = p1;
            p1 = change[p1][p[p2] - 'a'];
            cnt += pre - p1;
            if (p1 < 0) flag = false;
            p1--;
            p2--;
          }
        }
        if (flag) {
          int need = 0;
          if (p1 >= 0) {
            need = dp[p1][j - 1] + cnt;
          } else {
            if (j == 1) {
              need = cnt;
            } else {
              need = 0XFFFFFFF;
            }
          }
          dp[i][j] = min(dp[i][j], need);
        }
      }
      least[j] = min(dp[i][j], least[j]);
    }
  }
  for (int i = 0; i < int(n + 1); i++) {
    int tmp = 0;
    for (int j = 1; j <= int(z); j++)
      if (least[j] < 0XFFFFFFF) {
        if (least[j] <= i && j * m + i <= n) tmp = j;
      }
    cout << tmp << " ";
  }
  return 0;
}
int main() { return Main(); }
