/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
ifstream f("strmatch.in");
ofstream g("strmatch.out");
string a, b;
f>>a>>b;
int i, nr=0, j, size_b=b.size(), size_a=a.size(), ok, match_index[100000];
if(size_a > size_b)
{
g << 0;
return 0;
}
for(i=0; i<=size_b-size_a; i++ ){
ok=0;
if(b[i] == a[0]){
ok=1;
for(j=1; j<size_a; j++){
if(b[i+j] != a[j]){
ok=0;
break;
}
}
}
if(ok){
match_index[nr] = i;
nr++;
}
}
g<<nr<<endl;
for(i=0; i<nr; i++)
g<<match_index[i]<<" ";
return 0;
}