#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  string s1, s2;
  cin >> s1 >> s2;
  transform(s1.begin(), s1.end(), s1.begin(), ::tolower);
  transform(s2.begin(), s2.end(), s2.begin(), ::tolower);
  if (s1 == s2) {
    cout << 0;
  } else if (s1 < s2) {
    cout << -1;
  } else {
    cout << 1;
  }
  cout << '\n';
  return 0;
}
