#include <bits/stdc++.h>
char s[102], n[102];
int main() {
  scanf("%s", s);
  scanf("%s", n);
  int i, j, l;
  l = strlen(s);
  j = 0;
  int minus = 0, one = 0;
  for (i = 0; i < l; i++) {
    s[i] = tolower(s[i]);
    n[i] = tolower(n[i]);
    if (s[i] < n[i]) {
      minus = 1;
      break;
    } else if (s[i] == n[i]) {
    } else if (s[i] > n[i]) {
      one = 1;
      break;
    }
  }
  if (minus == 1)
    printf("-1\n");
  else if (one == 1)
    printf("1\n");
  else
    printf("0\n");
}
