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;
namespace my_useful_tools {
const int INF = 0x3f3f3f3f;
inline void pc(char c) { putchar(c); }
template <class T>
inline void R(T &a) {
  cin >> a;
}
template <class T>
inline void R(T &a, T &b) {
  cin >> a >> b;
}
template <class T>
inline void R(T &a, T &b, T &c) {
  cin >> a >> b >> c;
}
template <class T>
inline void W(T a, string plus = "\n") {
  cout << a << plus;
}
template <class T>
inline T gcd(T a, T b) {
  return b == 0 ? a : gcd(b, a % b);
}
template <class T>
inline void FR(T &ret, char c = ' ') {
  for (c = getchar(); c < '0' || '9' < c; c = getchar())
    ;
  for (ret = 0; '0' <= c && c <= '9'; c = getchar()) ret = ret * 10 + c - '0';
}
template <class T>
inline T fast_pow(T base, T index, T mod = 2147483647, T ret = 1) {
  for (; index; index >>= 1, base = base * base % mod)
    if (index & 1) ret = ret * base % mod;
  return ret;
}
inline char gchar() {
  char ret = getchar();
  for (; ret == '\n' || ret == '\r' || ret == ' '; ret = getchar())
    ;
  return ret;
}
const int maxv = 100;
const int maxe = 100;
struct Edge {
  int edge, head[maxv], to[maxe], next[maxe];
  Edge() {
    edge = 0;
    memset(head, -1, sizeof head);
  }
  void addedge(int u, int v) {
    to[edge] = v, next[edge] = head[u];
    head[u] = edge++;
  }
};
};  // namespace my_useful_tools
using namespace my_useful_tools;
const int maxn = 2000 + 100;
char s[maxn], t[maxn];
int f[maxn][maxn];
int lenS, lenT, a[maxn];
void upper(int &a, int b) {
  if (a < b) a = b;
}
int main() {
  scanf("%s\n%s", s + 1, t + 1);
  lenS = strlen(s + 1), lenT = strlen(t + 1);
  for (int j, i = 1; i <= lenS; ++i) {
    for (j = 1; i + lenT - 1 <= lenS && a[i] + i <= lenS && j <= lenT; ++a[i]) {
      if (s[i + a[i]] == t[j]) ++j;
    }
    if (j != lenT + 1) a[i] = -1;
  }
  for (int i = 1; i <= lenS; ++i) {
    for (int j = 0; j < i; ++j) {
      upper(f[i + 1][j], f[i][j]), upper(f[i + 1][j + 1], f[i][j]);
      if (a[i] != -1) upper(f[i + a[i]][j + a[i] - lenT], f[i][j] + 1);
    }
  }
  for (int i = 0; i <= lenS; ++i) {
    printf("%d ", f[lenS + 1][i]);
  }
  return 0;
}
