#include #define ALL(v) std::begin(v),std::end(v) using lint=long long; using ld=long double; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); std::string s,t;std::cin>>s>>t; lint l=s.length(),m=t.length(); if(m==1&&std::find(ALL(s),t.front())!=t.end()){ std::cout<<-1<<'\n'; return 0; } lint ans=0; for(lint i=0;i