#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  vector<char> a(str.begin(), str.end());
  cin >> str;
  vector<char> b(str.begin(), str.end());
  int res = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] >= 'a') a[i] += -'a' + 'A';
    if (b[i] >= 'a') b[i] += -'a' + 'A';
    if (a[i] > b[i]) {
      res = 1;
      break;
    } else if (a[i] < b[i]) {
      res = -1;
      break;
    }
  }
  printf("%d\n", res);
}
