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