#include <bits/stdc++.h>
using namespace std;
int main() {
  char s1[100], s2[100];
  int i;
  cin >> s1;
  cin >> s2;
  for (i = 0; s1[i] != '\0'; i++) {
    if (s1[i] >= 97) s1[i] = s1[i] - 32;
    if (s2[i] >= 97) s2[i] = s2[i] - 32;
    if (s1[i] < s2[i]) {
      cout << "-1";
      break;
    }
    if (s1[i] > s2[i]) {
      cout << "1";
      break;
    }
  }
  if (s1[i] == '\0') cout << "0";
  return 0;
}
