#include <bits/stdc++.h>
using namespace std;
int main() {
  string x;
  string y;
  cin >> x;
  cin >> y;
  for (int i = 0; i < x.size(); i++) {
    x[i] = tolower(x[i]);
    y[i] = tolower(y[i]);
  }
  int r = x.compare(y);
  cout << r;
  return 0;
}
