#include using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); string sa,sb,pa,pb; char xa,xb; cin>>sa>>pa>>xa; cin>>sb>>pb>>xb; if(pa==pb){ cout<<-1<pb.size()){ cout<pb[pa.size()-1-i]){ cout<