#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long n, m, k, i, j, s, g, h, p, l = 0;
int main() {
  string a, b;
  cin >> a >> b;
  transform(a.begin(), a.end(), a.begin(), ::tolower);
  transform(b.begin(), b.end(), b.begin(), ::tolower);
  for (i = 0; i < a.length(); i++)
    if (a[i] < b[i]) {
      cout << -1;
      return 0;
    } else {
      if (a[i] > b[i]) {
        cout << 1;
        return 0;
      }
    }
  cout << "0";
  return 0;
}
