#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  transform(s1.begin(), s1.end(), s1.begin(), ::tolower);
  transform(s2.begin(), s2.end(), s2.begin(), ::tolower);
  int counter = 0;
  for (int i = 0; i < s1.length(); i++) {
    if (int(s1[i]) > int(s2[i])) {
      cout << 1;
      counter = 1;
      break;
    } else if (int(s1[i]) < int(s2[i])) {
      cout << -1;
      counter = 1;
      break;
    } else {
      continue;
    }
  }
  if (counter == 0) {
    cout << 0;
  }
  return 0;
}
