#include <bits/stdc++.h>
int main() {
  char a[1000], b[1000];
  scanf("%s%s", a, b);
  int lena = strlen(a);
  int lenb = strlen(b);
  int max = lena < lenb ? lena : lenb;
  for (int i = 0; i < max; i++) {
    if (a[i] <= 'Z') a[i] = a[i] + 'a' - 'A';
    if (b[i] <= 'Z') b[i] = b[i] + 'a' - 'A';
    if (a[i] < b[i]) {
      printf("-1");
      return 0;
    }
    if (a[i] > b[i]) {
      printf("1");
      return 0;
    }
  }
  if (lena == lenb) {
    printf("0");
    return 0;
  }
  if (lena < lenb) {
    printf("-1");
    return 0;
  }
  printf("1");
}
