#include <bits/stdc++.h>
using namespace std;
int main() {
  string s[2];
  for (int i = 0; i < 2; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < 2; i++) {
    transform(s[i].begin(), s[i].end(), s[i].begin(), ::tolower);
  }
  if (s[0] == s[1])
    cout << "0";
  else if (s[0] < s[1])
    cout << "-1";
  else
    cout << "1";
  return 0;
}
