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