# -*- coding: utf-8 -*-
"""
Created on Fri Jan  4 00:01:04 2019

@author: Noussa
"""

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