#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;
    }
  }
  printf("%d\n", c1.compare(c2));
  return 0;
}
