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