#include <cstdio>
#include <cstring>
#define p 73
#define mod1 100007
#define mod2 100021
#define nmax 2000001
#define FOR(i,a,b) for( int i=a; i<b; i++)
FILE *in,*out;
using namespace std;
int nr,v[100000],poz;
char prim[nmax], doi[nmax], sol[nmax];
int scai1=0, scai2=0, scaia1=0, scaia2=0, p1=1, p2=1, n1, n2, cnt=0;
int main()
{
in=fopen("strmatch.in","rt");
out=fopen("strmatch.out", "wt");
fscanf(in,"%s %s", prim,doi);
fclose(in);
n1=strlen(prim);
n2=strlen(doi);
if(n1>n2)
{
fprintf(out,"0");
fclose(out);
return 0;
}
else
{
char *p1;
p1=strstr(doi,prim);
v[poz++]=p1-doi;
while(p1!=NULL)
{
nr++;
p1=strstr(p1+1,prim);
if(p1) v[poz++]=p1-doi;
}
fprintf(out,"%hd\n",nr);
for( int i=0;i<poz;i++)
fprintf(out,"%d ",v[i]);
fclose(out);
}
return 0;
}