#include <bits/stdc++.h>
int main() {
  char a[100], b[100];
  short s[100], u[100], w = 0;
  scanf("%s %s", a, b);
  int n = strlen(a);
  for (int i = 0; i < n; i++) {
    s[i] = a[i];
    u[i] = b[i];
    if (u[i] <= 90) u[i] += 32;
    if (s[i] <= 90) s[i] += 32;
    if (s[i] == u[i])
      w++;
    else if (s[i] > u[i]) {
      printf("1");
      break;
    } else if (s[i] < u[i]) {
      printf("-1");
      break;
    }
  }
  if (w == n) printf("0");
  return 0;
}
