## 代码

#include <bits/stdc++.h>
using namespace std;
const int maxn=2e6+1;
const double PI=acos(-1.0);

struct cd{
double x,y;
inline cd (double x_=0,double y_=0):x(x_),y(y_){}
inline cd operator + (const cd &b) const{return cd(x+b.x,y+b.y);};
inline cd operator - (const cd &b) const{return cd(x-b.x,y-b.y);};
inline cd operator * (const cd &b) const{return cd(x*b.x-y*b.y,x*b.y+y*b.x);}
inline cd operator / (const double &b) const{return cd(x/b,y/b);};
};

int n,m,s,bit,rev[maxn];

void init(){
for (bit=1,s=2;(1<<bit)<2*n;++bit) s<<=1;
for (int i=0;i<s;++i) rev[i]=(rev[i>>1]>>1)|((i&1)<<(bit-1));
}

void fft(cd *a,int n,int dft){
for (int i=0;i<n;++i)
if (i<rev[i]) swap(a[i],a[rev[i]]);
for (int step=1;step<n;step<<=1){
cd wn(cos(PI/step),dft*sin(PI/step));
for (int j=0;j<n;j+=step<<1){
cd wnk(1,0);
for (int k=j;k<j+step;++k,wnk=wnk*wn){
cd t=wnk*a[k+step];
a[k+step]=a[k]-t;
a[k]=a[k]+t;
}
}
}
if (dft==-1) for (int i=0;i<n;++i) a[i]=a[i]/(double)n;
}

cd a2[maxn],b2[maxn],c[maxn];
int a[maxn],b[maxn];
char s1[maxn],s2[maxn];
queue<int>q;

int main(){
scanf("%d%d%s%s",&m,&n,s1,s2);
init();
for (int i=0;i<m;++i)
if (s1[m-i-1]!='*') a[i]=s1[m-i-1]-'a'+1;
for (int i=0;i<n;++i)
if (s2[i]!='*') b[i]=s2[i]-'a'+1;

for (int i=0;i<m;++i) a2[i]=cd(a[i]*a[i]*a[i],0);
for (int i=0;i<n;++i) b2[i]=cd(b[i],0);
fft(a2,s,1),fft(b2,s,1);
for (int i=0;i<s;++i) c[i]=c[i]+a2[i]*b2[i];
for (int i=0;i<s;++i) a2[i]=b2[i]=cd(0,0);

for (int i=0;i<m;++i) a2[i]=cd(a[i]*a[i],0);
for (int i=0;i<n;++i) b2[i]=cd(b[i]*b[i],0);
fft(a2,s,1),fft(b2,s,1);
for (int i=0;i<s;++i) c[i]=c[i]-a2[i]*b2[i]-a2[i]*b2[i];
for (int i=0;i<s;++i) a2[i]=b2[i]=cd(0,0);

for (int i=0;i<m;++i) a2[i]=cd(a[i],0);
for (int i=0;i<n;++i) b2[i]=cd(b[i]*b[i]*b[i],0);
fft(a2,s,1),fft(b2,s,1);
for (int i=0;i<s;++i) c[i]=c[i]+a2[i]*b2[i];

fft(c,s,-1);
for (int i=m-1;i<n;++i)
if (fabs(c[i].x<0.5)) q.push(i-m+2);
printf("%d\n",q.size());
while(!q.empty()) printf("%d ",q.front()),q.pop();
}