#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int cnt = 0, cnt1 = 0, cnt2 = 0;
  cin >> a >> b;
  transform(a.begin(), a.end(), a.begin(), ::tolower);
  transform(b.begin(), b.end(), b.begin(), ::tolower);
  cnt = a.compare(b);
  if (cnt > 0) {
    cout << 1 << endl;
  } else if (cnt < 0) {
    cout << -1 << endl;
  } else {
    cout << 0 << endl;
  }
  return 0;
}
