#include<bits/stdc++.h>
using namespace std;
using UL = unsigned int;
using ULL = unsigned long long;
using LL = long long;
#define rep(i,n) for(UL i=0; i<(n); i++)

int main() {
 string T,P; cin>>T>>P;
 if(T.size()<P.size()) return 0;
 rep(i,T.size()-P.size()+1){
  bool ok=true;
  rep(j,P.size()) if(T[i+j]!=P[j]) ok=false;
  if(ok) printf("%u\n",i);
 }
 return 0;
}

