#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); string s,t; cin>>s>>t; int a=s.size(),b=t.size(); rep(i,1000) s+='$'; if(b==1){ rep(i,a){ if(s[i]==t[0]){ cout<<-1<=a) break; } cout<