#include <bits/stdc++.h>
using namespace std;
string c1, c2;
int main() {
  int x;
  cin >> c1 >> c2;
  for (int i = 0; i < c1.size(); i++) {
    if (c1[i] < 92) {
      c1[i] += 32;
    }
    if (c2[i] < 92) {
      c2[i] += 32;
    }
  }
  if (c1 < c2) {
    x = -1;
  } else if (c1 > c2) {
    x = 1;
  } else {
    x = 0;
  }
  printf("%d\n", x);
  return 0;
}
