#include<cstdio>
#include<cstring>
#include<bitset>
using namespace std;
const int N=1e5+10;
int n,m,last[26];
char s[N],t[N];
bitset<N> pos[26],ans;
int main()
{
freopen("guess.in","r",stdin);
freopen("guess.out","w",stdout);
scanf("%s%s",s,t);
n=strlen(s);
m=strlen(t);
for (int i=0;i<n;i++)
ans[i]=pos[s[i]-'a'][i]=1;
for (int i=0;i<m;i++)
if (t[i]!='?'){
int now=t[i]-'a';
pos[now]>>=i-last[now];
ans&=pos[now];
last[now]=i;
}
int sum=0;
for (int i=0;i<=n-m;i++) sum+=ans[i];
printf("%d\n",sum);
for (int i=0;i<=n-m;i++)
if (ans[i]) printf("%d\n",i);
return 0;
}