#include <bits/stdc++.h>
using namespace std;
int main() {
  string str1, str2;
  cin >> str1 >> str2;
  int l1 = str1.length();
  int l2 = str2.length();
  for (int i = 0; i < l1; i++) {
    str1[i] = tolower(str1[i]);
  }
  for (int i = 0; i < l2; i++) {
    str2[i] = tolower(str2[i]);
  }
  if (str1 == str2)
    cout << 0;
  else if (str1 < str2)
    cout << -1;
  else
    cout << 1;
  cout << endl;
}
