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