#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] - 90 > 0) {
      a[i] -= 32;
    }
    if (b[i] - 90 > 0) {
      b[i] -= 32;
    }
    int x = a[i];
    int y = b[i];
    if (x < y) {
      cout << -1 << endl;
      return 0;
    } else if (x > y) {
      cout << 1 << endl;
      return 0;
    }
  }
  cout << 0 << endl;
  return 0;
}
