#include <bits/stdc++.h>
using namespace std;
bool isUpper(string s) {
  return std::all_of(s.begin(), s.end(),
                     [](unsigned char c) { return std::isupper(c); });
}
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  transform(s1.begin(), s1.end(), s1.begin(), ::tolower);
  transform(s2.begin(), s2.end(), s2.begin(), ::tolower);
  int ans = 0;
  for (int i = 0; i < s1.length(); i++) {
    if (s1[i] > s2[i]) {
      ans = 1;
      break;
    } else if (s1[i] < s2[i]) {
      ans = -1;
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
