#include <iostream>
#include <string.h>
using namespace std;
#define MAX 255
int myStrcmp(char s1[], char s2[]);
int main()
{
char s1[MAX], s2[MAX];
cin.getline(s1,MAX);
cin.getline(s2,MAX);
int kt = myStrcmp(s1, s2);
cout << kt << endl;
return 0;
}
int myStrlen(char s[]){
int dem = 0;
for (int i=0;s[i]!='\0';i++) ++dem;
return dem;
}
int myStrcmp(char s1[], char s2[]){
if (myStrlen(s1)>myStrlen(s2)) return 1;
else if (myStrlen(s1)<myStrlen(s2)) return -1;
else {
for (int i=0;i<myStrlen(s1);i++)
if (s1[i]>s2[i]) return 1;
else if (s1[i]<s2[i]) return -1;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgTUFYIDI1NQoKaW50IG15U3RyY21wKGNoYXIgczFbXSwgY2hhciBzMltdKTsKCmludCBtYWluKCkKewoJY2hhciBzMVtNQVhdLCBzMltNQVhdOwoJY2luLmdldGxpbmUoczEsTUFYKTsKCWNpbi5nZXRsaW5lKHMyLE1BWCk7CglpbnQga3QgPSBteVN0cmNtcChzMSwgczIpOwoJY291dCA8PCBrdCA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0KCmludCBteVN0cmxlbihjaGFyIHNbXSl7CiAgICBpbnQgZGVtID0gMDsKICAgIGZvciAoaW50IGk9MDtzW2ldIT0nXDAnO2krKykgKytkZW07CiAgICByZXR1cm4gZGVtOwp9CgoKaW50IG15U3RyY21wKGNoYXIgczFbXSwgY2hhciBzMltdKXsKICAgIGlmIChteVN0cmxlbihzMSk+bXlTdHJsZW4oczIpKSByZXR1cm4gMTsKICAgIGVsc2UgaWYgKG15U3RybGVuKHMxKTxteVN0cmxlbihzMikpIHJldHVybiAtMTsKICAgIGVsc2UgewogICAgICAgIGZvciAoaW50IGk9MDtpPG15U3RybGVuKHMxKTtpKyspCiAgICAgICAgICAgIGlmIChzMVtpXT5zMltpXSkgcmV0dXJuIDE7CiAgICAgICAgICAgIGVsc2UgaWYgKHMxW2ldPHMyW2ldKSByZXR1cm4gLTE7CgogICAgfQogICAgcmV0dXJuIDA7Cgp9