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;
char s[2048], p[512];
int lenS, lenP, minX[2048], necD, posD, maxStr;
int ans[2048], dels[2048];
int ans2[2048][2048];
int getAns(int ind, int xLeft) {
  if (ind == lenS) {
    if (xLeft == 0) {
      return 0;
    } else {
      return -(1 << 20);
    }
  }
  if (ans2[ind][xLeft]) {
    return ans2[ind][xLeft] - 1;
  }
  ans2[ind][xLeft] = -(1 << 20);
  if (minX[ind] != -1 && minX[ind] <= xLeft) {
    ans2[ind][xLeft] =
        getAns(ind + lenP + minX[ind], xLeft - minX[ind]) + 1 + 1;
  }
  ans2[ind][xLeft] = max(ans2[ind][xLeft], getAns(ind + 1, xLeft) + 1);
  if (xLeft) {
    ans2[ind][xLeft] = max(ans2[ind][xLeft], getAns(ind + 1, xLeft - 1) + 1);
  }
  return ans2[ind][xLeft] - 1;
}
int main() {
  cin >> s >> p;
  lenS = strlen(s);
  lenP = strlen(p);
  for (int i2 = 0; i2 < lenS; i2++) {
    minX[i2] = -1;
    int i = i2, j = 0, cX = 0;
    for (; j < lenP && i < lenS; i++) {
      if (s[i] == p[j]) {
        j++;
      } else {
        cX++;
      }
    }
    if (j == lenP) {
      minX[i2] = cX;
    }
  }
  int prevE = lenS;
  for (int i = lenS - 1; i >= 0; i--) {
    if (minX[i] == -1) {
      continue;
    }
    if (i + lenP + minX[i] <= prevE) {
      prevE = i;
      dels[maxStr] = minX[i];
      maxStr++;
      necD += minX[i];
    }
  }
  posD = lenS - maxStr * lenP - necD;
  sort(dels, dels + maxStr);
  for (int i = necD; i <= necD + posD; i++) {
    ans[i] = maxStr;
  }
  for (int i = necD + posD; i <= lenS; i++) {
    int cGet = (i - necD - posD) / lenP;
    if ((i - necD - posD) % lenP) {
      cGet++;
    }
    ans[i] = maxStr - cGet;
  }
  for (int i = necD - 1; i >= 0; i--) {
    ans[i] = getAns(0, i);
  }
  for (int i = 0; i <= lenS; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}
