#include <bits/stdc++.h>
using namespace std;
int main() {
  string first;
  string second;
  cin >> first;
  cin >> second;
  int len1 = first.length();
  int len2 = second.length();
  int a = 0;
  if (len1 == len2 && len1 >= 1 && len1 <= 100) {
    for (int i = 0; i < len1; i++) {
    }
    for (int i = 0; i < len1; i++) {
      tolower(first[i]);
      tolower(second[i]);
      if (tolower(first[i]) == tolower(second[i])) {
        a = 0;
        continue;
      } else if (tolower(first[i]) < tolower(second[i])) {
        a = -1;
        break;
      } else if (tolower(first[i]) > tolower(second[i])) {
        a = 1;
        break;
      }
    }
    cout << a;
  }
  return 0;
}
