#include <bits/stdc++.h>
using namespace std;
string s, d;
int x;
int main() {
  cin >> s;
  cin >> d;
  x = s.size();
  for (int i = 0; i < x; i++) {
    s[i] = tolower(s[i]);
    d[i] = tolower(d[i]);
    int r, t;
    r = s[i];
    t = d[i];
    if (r > t) {
      cout << "1";
      return 0;
    }
    if (r < t) {
      cout << "-1";
      return 0;
    }
  }
  cout << "0";
  return 0;
}
