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