a = input().lower()
b = input().lower()
if(a < b):
print(-1)
elif(b < a):
print(1)
elif(a == b):
print(0)
a = input().lower()
b = input().lower()
if(a < b):
print(-1)
elif(b < a):
print(1)
elif(a == b):
print(0)