#include <bits/stdc++.h>
using namespace std;
string string1, string2;
int counter = 0;
int main() {
  cin >> string1 >> string2;
  for (int i = 0; i < string1.size(); i++) {
    if (int(tolower(string1[i])) > int(tolower(string2[i]))) {
      cout << 1 << endl;
      break;
    } else if (int(tolower(string1[i])) < int(tolower(string2[i]))) {
      cout << -1 << endl;
      break;
    } else
      counter++;
  }
  if (counter == string2.size()) cout << 0 << endl;
  return 0;
}
