#include<iostream>
#include<cstdio>
#include<vector>
#include<bits/stdc++.h>
using namespace std;
int Length(string s)
{
int len=0;
for(int i=0;s[i]!='\0';i++)
{
len++;
}
return len;
}
vector<int>substringfind(string s,string sub)
{
int lens=Length(s);
int lensub=Length(sub);
vector<int>pos;
int paisi=0;
for(int i=0;i<=lens-lensub;i++)
{
int matched=0;
for(int j=0;j<lensub;j++)
{
if(sub[j]==s[i+j])
{
matched++;
continue;
}
else
break;
}
if(matched==lensub)
{
pos.push_back(i);
}
}
return pos;
}
int main()
{
string s,sub;
cin>>s>>sub;
vector<int>position=substringfind(s,sub);
for(int i=0;i<position.size();i++)
{
cout<<position[i];
}
cout<<endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNzdGRpbz4KI2luY2x1ZGU8dmVjdG9yPgojaW5jbHVkZTxiaXRzL3N0ZGMrKy5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgTGVuZ3RoKHN0cmluZyBzKQp7CmludCBsZW49MDsKZm9yKGludCBpPTA7c1tpXSE9J1wwJztpKyspCnsKbGVuKys7Cn0KcmV0dXJuIGxlbjsKfQp2ZWN0b3I8aW50PnN1YnN0cmluZ2ZpbmQoc3RyaW5nIHMsc3RyaW5nIHN1YikKewppbnQgbGVucz1MZW5ndGgocyk7CmludCBsZW5zdWI9TGVuZ3RoKHN1Yik7CnZlY3RvcjxpbnQ+cG9zOwppbnQgcGFpc2k9MDsKZm9yKGludCBpPTA7aTw9bGVucy1sZW5zdWI7aSsrKQp7CmludCBtYXRjaGVkPTA7CmZvcihpbnQgaj0wO2o8bGVuc3ViO2orKykKewppZihzdWJbal09PXNbaStqXSkKewptYXRjaGVkKys7CmNvbnRpbnVlOwp9CmVsc2UKYnJlYWs7Cn0KaWYobWF0Y2hlZD09bGVuc3ViKQp7CnBvcy5wdXNoX2JhY2soaSk7Cn0KfQpyZXR1cm4gcG9zOwp9CmludCBtYWluKCkKewpzdHJpbmcgcyxzdWI7CmNpbj4+cz4+c3ViOwp2ZWN0b3I8aW50PnBvc2l0aW9uPXN1YnN0cmluZ2ZpbmQocyxzdWIpOwpmb3IoaW50IGk9MDtpPHBvc2l0aW9uLnNpemUoKTtpKyspCnsKY291dDw8cG9zaXRpb25baV07Cn0KY291dDw8ZW5kbDsKcmV0dXJuIDA7Cn0=