#include<iostream>
int main() {
std::string str, s; s.clear(); str.clear();
char c;
int first_index = 0, n = 0, index = 0;
s.push_back(' ');str.push_back(' ');
while ((c = getchar()) != '\n')s.push_back(tolower(c));
while ((c = getchar()) != '\n') str.push_back(tolower(c));
s.push_back(' '); str.push_back(' ');
first_index = str.find(s);
if (first_index != -1) {
for (index = first_index + 1; index != 0; n++) {
if (index >= str.length());
index = str.find(s, index) + 1;
}
std::cout << n << ' ';
}
std::cout << first_index << '\n';
return 0;
}