#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1;
  string s2;
  cin >> s1;
  cin >> s2;
  for (int i = 0; i < s1.size(); i++) {
    s1[i] = tolower(s1[i]);
    s2[i] = tolower(s2[i]);
  }
  if ((s1.compare(s2)) < 0)
    cout << "-1";
  else if ((s1.compare(s2)) == 0)
    cout << "0";
  else
    cout << "1";
  return 0;
}
