import std.stdio;
import std.conv;
import std.algorithm;
import std.range;
import std.string;
import std.typecons;

void main()
{
    auto a = readln().strip;
    auto b = readln().strip;
    size_t sub = 0;
    while (true)
    {
        sub = a.indexOf(b, sub);
        if (sub == cast(size_t)-1)
        {
            break;
        }
        else
        {
            writeln(sub);
            sub++;
        }
    }
}
