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