#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
string s1, second;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s1 >> second;
  for (int i = 0; i < s1.length(); i++) {
    if (s1[i] >= 97) s1[i] -= 32;
    if (second[i] >= 97) second[i] -= 32;
    if (s1[i] < second[i]) {
      cout << -1 << '\n';
      return 0;
    } else if (second[i] < s1[i]) {
      cout << 1 << '\n';
      return 0;
    }
  }
  cout << 0 << '\n';
  return 0;
  return 0;
}
