#include <bits/stdc++.h>
int main() {
  int i, j;
  char c[100], d[100];
  gets(c);
  gets(d);
  int l = strlen(c);
  int m = strlen(d);
  for (i = 0; i < l; i++) {
    if (c[i] >= 'A' && c[i] <= 'Z') c[i] = c[i] + 32;
  }
  for (j = 0; j < m; j++) {
    if (d[j] >= 'A' && d[j] <= 'Z') d[j] = d[j] + 32;
  }
  int f = strcmp(c, d);
  printf("%d", f);
}
