#include <bits/stdc++.h>
using namespace std;
string tolower(string in) {
  for (int i = 0; i < in.length(); i++) {
    if (in[i] <= 'Z' && in[i] >= 'A') in[i] = in[i] - ('Z' - 'z');
  }
  return in;
}
int solve(string a, string b) {
  for (int i = 0; i < a.length(); i++) {
    if (a[i] < b[i]) {
      return -1;
    } else if (a[i] > b[i]) {
      return 1;
    }
  }
  return 0;
}
int main() {
  string a, b;
  cin >> a >> b;
  a = tolower(a);
  b = tolower(b);
  cout << solve(a, b);
  return 0;
}
