#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string s1, s2;
  int j = 0;
  cin >> s1 >> s2;
  int n = s1.size();
  transform(s1.begin(), s1.end(), s1.begin(), ::tolower);
  transform(s2.begin(), s2.end(), s2.begin(), ::tolower);
  for (int i = 0; i < (n); i++) {
    if (s1[i] > s2[i]) {
      cout << 1;
      j = 1;
      break;
    }
    if (s1[i] < s2[i]) {
      cout << -1;
      j = 1;
      break;
    }
  }
  if (!j) cout << 0;
  cout << '\n';
  return 0;
}
