#include <bits/stdc++.h>
char str1[105], str2[105];
int main(void) {
  scanf("%s%s", str1, str2);
  int len1 = strlen(str1), len2 = strlen(str2);
  int i = 0;
  int flag = -100;
  while (i < len1 && i < len2) {
    if (str1[i] >= 'a') str1[i] -= 32;
    if (str2[i] >= 'a') str2[i] -= 32;
    if (str1[i] < str2[i]) {
      flag = -1;
      break;
    } else if (str1[i] > str2[i]) {
      flag = 1;
      break;
    }
    i++;
  }
  if (flag == -100) {
    if (len1 > len2)
      flag = 1;
    else if (len1 == len2)
      flag = 0;
    else
      flag = -1;
  }
  printf("%d\n", flag);
}
