#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, p;
  int i;
  int a = 1, b = -1, c = 0;
  cin >> s;
  cin >> p;
  for (i = 0; i < s.size(); i++) {
    transform(s.begin(), s.end(), s.begin(), ::tolower);
    transform(p.begin(), p.end(), p.begin(), ::tolower);
    if (s[i] > p[i]) {
      cout << a << endl;
      break;
    }
    if (s[i] < p[i]) {
      cout << b << endl;
      break;
    }
  }
  if (s == p) cout << c << endl;
  return 0;
}
