#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, i, j;
  string s1, s2;
  cin >> s1 >> s2;
  long long int ans = 0;
  for (i = 0; i < s1.length(); i++) {
    s1[i] = tolower(s1[i]);
    s2[i] = tolower(s2[i]);
    if (s1[i] < s2[i]) {
      ans = -1;
      break;
    } else if (s1[i] > s2[i]) {
      ans = 1;
      break;
    }
  }
  cout << ans << '\n';
}
