#include <bits/stdc++.h>
using namespace std;
int main() {
  string arr1;
  string arr2;
  int cn1 = 0, cn2 = 0;
  cin >> arr1;
  cin >> arr2;
  transform(arr1.begin(), arr1.end(), arr1.begin(), ::tolower);
  transform(arr2.begin(), arr2.end(), arr2.begin(), ::tolower);
  for (int i = 0; i < arr1.length(); i++) {
    if (arr1[i] == arr2[i]) {
      cn1 = cn1 + int(arr1[i]);
      cn2 = cn2 + int(arr2[i]);
    } else {
      cn1 = cn1 + int(arr1[i]);
      cn2 = cn2 + int(arr2[i]);
      break;
    }
  }
  if (cn1 < cn2)
    cout << "-1";
  else if (cn1 > cn2)
    cout << "1";
  else
    cout << "0";
  return 0;
}
