#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, x;
  char s1[101], s2[101];
  cin >> s1 >> s2;
  n = strlen(s1);
  for (i = 0; i < n; i++) {
    s1[i] = tolower(s1[i]);
  }
  for (i = 0; i < n; i++) {
    s2[i] = tolower(s2[i]);
  }
  x = strcmp(s1, s2);
  if (x == 0) {
    cout << "0" << endl;
  } else if (x == -1) {
    cout << "-1" << endl;
  } else {
    cout << "1" << endl;
  }
  return 0;
}
