#include <bits/stdc++.h>
using namespace std;
using namespace std;
void solve() {
  long long m, n, i, a, j, p, q, ans = 0, l, r, ans2;
  string s1, s2;
  cin >> s1 >> s2;
  for (long long i = 0; i < s1.size(); i++) {
    if (s1[i] - s2[i] != 0 && abs(s1[i] - s2[i]) != 'a' - 'A') {
      if (s1[i] >= 97)
        p = s1[i] - 97;
      else
        p = s1[i] - 65;
      if (s2[i] >= 97)
        q = s2[i] - 97;
      else
        q = s2[i] - 65;
      if (p > q) {
        cout << 1;
        return;
      } else {
        cout << -1;
        return;
      }
    }
  }
  cout << 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  t = 1;
  while (t--) solve();
  return 0;
}
