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