#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  int i, j = 0;
  cin >> s1 >> s2;
  for (i = 0; i < s1.length(); i++) {
    s1.at(i) = tolower(s1.at(i));
    s2.at(i) = tolower(s2.at(i));
  }
  for (i = 0; i < s1.length(); i++) {
    if (s1.at(i) > s2.at(i)) {
      cout << "1";
      break;
    } else if (s1.at(i) < s2.at(i)) {
      cout << "-1";
      break;
    } else if (s1.at(i) == s2.at(i)) {
      j++;
    }
  }
  if (j == s1.length()) cout << "0";
}
