#include <bits/stdc++.h>
using namespace std;
string s,t,sz=" ",tz=" ";
int n,l1,r1,l2,r2;
void zichuan();
int main(){
cin>>s>>t>>n;
for(int i=0;i<n;i++){
cin>>l1>>r1>>l2>>r2;
zichuan();
if(sz<tz) cout<<"yifusuyi"<<endl;
else if(sz>tz) cout<<"erfusuer"<<endl;
else cout<<"ovo"<<endl;
}
return 0;
}
void zichuan(){
sz=" ",tz=" ";
int i=0;
for(int j=l1-1;j<r1;j++) sz[i]=s[j],i++;
i=0;
for(int j=l2-1;j<r2;j++) tz[i]=t[j],i++;
}