#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s, s1, s2, s3;
  cin >> s >> s1;
  unsigned long long int l = s.size();
  unsigned long long int f = 0, sf, sg, p;
  for (unsigned long long int i = 0; i < l; i++) {
    if ((int)s[i] <= 90) {
      s2 += s[i] + 32;
    } else {
      s2 += s[i];
    }
  }
  for (unsigned long long int i = 0; i < l; i++) {
    if ((int)s1[i] <= 90) {
      s3 += s1[i] + 32;
    } else {
      s3 += s1[i];
    }
  }
  if (s2 == s3)
    cout << 0 << endl;
  else {
    for (unsigned long long int i = 0; i < l; i++) {
      if (s2[i] != s3[i]) {
        sf = (int)s2[i];
        sg = (int)s3[i];
        break;
      }
    }
    if (sf > sg)
      cout << 1 << endl;
    else
      cout << -1 << endl;
  }
}
