#include <bits/stdc++.h>
char a[101], b[101];
int main(void) {
  scanf("%s %s", a, b);
  int d = 0;
  for (int i = 0; a[i]; i++) {
    char x = ((a[i] >= 'A' && a[i] <= 'Z') ? (a[i] - 'A' + 'a') : a[i]),
         y = ((b[i] >= 'A' && b[i] <= 'Z') ? (b[i] - 'A' + 'a') : b[i]);
    if (x != y) {
      d = (x > y) ? 1 : -1;
      break;
    }
  }
  printf("%d\n", d);
  return 0;
}
