#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;
getline(cin,s);
getline(cin,t);
int p=-1;
p=s.find(t,0);
if(p==-1) cout<<-1;
else{
while(p!=-1){
cout<<p+1<<endl;
p=s.find(t,p+1);
}
}
return 0;
}
/**************************************************************
Problem: 1591
User: linweilun
Language: C++
Result: Accepted
Time:15 ms
Memory:2076 kb
****************************************************************/