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