#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  string b, a;
  cin >> a >> b;
  for (int i = (0); i < (a.size()); ++i) {
    if (tolower(a[i]) == tolower(b[i])) continue;
    if (tolower(a[i]) < tolower(b[i])) {
      printf("-1\n");
      return 0;
    } else {
      printf("1\n");
      return 0;
    }
  }
  printf("0\n");
  return 0;
}
