#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
void solve(const std::string& str, const std::string& stamp, std::vector<int>& result)
{
auto pos = str.find(stamp);
if(pos == std::string::npos)
return;
for(int i = 0; i < ((int) str.length() - (int)stamp.length() + 1); i++)
{
for(int k = 0; k < (int) stamp.length(); k++)
{
if(str.substr(i, stamp.length()) == stamp)
{
result.push_back(i + 1);
i += stamp.length() - 2;
break;
}
if(str[i + k] == stamp[k])
{
result.push_back(i + 1);
break;
}
}
}
std::string resstring;
resstring.resize(str.size());
do
{
memset((void*) resstring.data(), '?', resstring.length());
for(int i : result)
{
memcpy(&resstring[i - 1], stamp.data(), stamp.size());
}
if(resstring == str)
{
return;
}
}
while(std::next_permutation(result.begin(), result.end()));
result.clear();
}
int main()
{
std::ios_base::sync_with_stdio(false);
std::cin.tie(0);
// = "ABCDABCDABCDABCD"
// = "ABCD"
std::string str, stamp;
std::cin >> str;
std::cin >> stamp;
std::vector<int> res;
solve(str, stamp, res);
if(res.size() != 0)
{
std::cout << res.size() << "\n";
for(int a : res)
{
std::cout << a << " ";
}
}
else
{
std::cout << "-1";
}
// std::system("pause");
}