import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNextLine()){ String[] ss = sc.nextLine().split(" "); String[] s1 = ss[0].split("\\."); String[] s2 = ss[1].split("\\."); int n = s1.length; int m = s2.length; int L = Math.max(n, m); boolean flag = true; for(int i = 0; i < L; ++i){ int a1 = 0; if(i < n){ a1 = Integer.parseInt(s1[i]); } int a2 = 0; if(i < m){ a2 = Integer.parseInt(s2[i]); } if(a1 == a2){ continue; }else{ System.out.println(a1 > a2 ? 1 : -1); flag = false; break; } } if(flag){ System.out.println(0); } } } }