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