#include <bits/stdc++.h>
using namespace std;
int flag = 0;
int main() {
  char A[101], B[101];
  int L;
  cin >> A >> B;
  L = strlen(A);
  for (int i = 0; i < L; i++) {
    A[i] = tolower(A[i]);
    B[i] = tolower(B[i]);
    if (A[i] < B[i]) {
      flag = -1;
      break;
    } else if (A[i] > B[i]) {
      flag = 1;
      break;
    }
  }
  cout << flag;
  getchar();
}
