#include <bits/stdc++.h>
using namespace std;
int main() {
  char* arr1 = new char[100];
  char* arr2 = new char[100];
  cin >> arr1 >> arr2;
  int y = strlen(arr1);
  for (int i = 0; i < y; i++) {
    if (arr1[i] >= 65 && arr1[i] <= 90) arr1[i] += 32;
    if (arr2[i] >= 65 && arr2[i] <= 90) arr2[i] += 32;
  }
  int a = 0;
  for (int i = 0; i < y; i++) {
    if (arr1[i] == arr2[i]) a++;
  }
  if (a == y)
    cout << "0";
  else {
    for (int i = 0; i < y; i++) {
      if (arr1[i] > arr2[i]) {
        cout << "1";
        break;
      } else if (arr1[i] < arr2[i]) {
        cout << "-1";
        break;
      }
    }
  }
  return 0;
}
