#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  int ans = 0;
  cin >> s1 >> s2;
  int n = s1.size();
  for (int i = 0; i < n; ++i) {
    if (s1[i] >= 'A' && s1[i] <= 'Z') s1[i] += 32;
  }
  for (int i = 0; i < n; ++i) {
    if (s2[i] >= 'A' && s2[i] <= 'Z') s2[i] += 32;
  }
  for (int i = 0; i < n; ++i) {
    if (s1[i] == s2[i])
      continue;
    else if (s1[i] > s2[i]) {
      ans = 1;
      break;
    } else {
      ans = -1;
      break;
    }
  }
  cout << ans << "\n";
  return 0;
}
