#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int i, j;
  int len = s1.length();
  int sum = 0, sum1 = 0;
  for (i = 0; i < len; i++) {
    if (s1[i] >= 'a' && s1[i] <= 'z') {
      s1[i] = s1[i] + 'A' - 'a';
    }
    if (s2[i] >= 'a' && s2[i] <= 'z') {
      s2[i] = s2[i] + 'A' - 'a';
    }
  }
  if (s1 > s2)
    cout << "1" << endl;
  else if (s1 < s2)
    cout << "-1" << endl;
  else
    cout << "0" << endl;
}
