#include <bits/stdc++.h>
int main(void) {
  char word1[101];
  char word2[101];
  int sum1 = 0, sum2 = 0;
  scanf("%s", word1);
  scanf("%s", word2);
  int n = strlen(word1);
  for (int i = 0; i < n; i++) {
    if (tolower(word1[i]) > tolower(word2[i])) {
      printf("1\n");
      return 0;
    }
    if (tolower(word1[i]) < tolower(word2[i])) {
      printf("-1\n");
      return 0;
    }
  }
  printf("0\n");
  return 0;
}
