#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[100], sty[100];
  int x, n;
  cin >> str >> sty;
  n = strlen(str);
  for (int j = 0; j < n; j++)
    if (str[j] >= 65 && str[j] <= 90) {
      str[j] = str[j] + 32;
    }
  for (int j = 0; j < n; j++)
    if (sty[j] >= 65 && sty[j] <= 90) {
      sty[j] = sty[j] + 32;
    } else {
      continue;
    }
  x = strcmp(str, sty);
  if (x == 0) {
    cout << "0";
  }
  if (x < 0) {
    cout << "-1";
  }
  if (x > 0) {
    cout << "1";
  }
  return 0;
}
