n=input().upper()
k=input().upper()
s=0
for i in n:
s+=ord(i)
h=0
for i in k:
h+=ord(i)
if s>h:
print(1)
elif h>s:
print(-1)
else:
print(0)