#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
string s0;
cin>>s>>s0;
for(int i=0;i<s.length();i++){
s[i]=tolower(s[i]);
}
for(int j=0;j<s0.length();j++){
s0[j]=tolower(s0[j]);
}
int c=s.compare(s0);
if(c==0){
cout<<0<<"\n";
}
else if(c>0){
cout<<1<<"\n";
}
else cout<<-1<<"\n";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCXN0cmluZyBzOwoJc3RyaW5nIHMwOwoJY2luPj5zPj5zMDsKCWZvcihpbnQgaT0wO2k8cy5sZW5ndGgoKTtpKyspewoJCXNbaV09dG9sb3dlcihzW2ldKTsKCX0KCWZvcihpbnQgaj0wO2o8czAubGVuZ3RoKCk7aisrKXsKCQlzMFtqXT10b2xvd2VyKHMwW2pdKTsKCX0KCWludCBjPXMuY29tcGFyZShzMCk7CglpZihjPT0wKXsKCQljb3V0PDwwPDwiXG4iOwoJfQoJZWxzZSBpZihjPjApewoJCWNvdXQ8PDE8PCJcbiI7Cgl9CgllbHNlIGNvdXQ8PC0xPDwiXG4iOwoJcmV0dXJuIDA7Cn0=