#include <bits/stdc++.h>
using namespace std;
vector<long long> ans;
long long temp;
int main() {
  string a;
  string b;
  int flag = 0;
  cin >> a;
  cin >> b;
  for (int i = 0; i < (int)a.length(); ++i) {
    if (a[i] >= 97) a[i] = char(a[i] - 32);
    if (b[i] >= 97) b[i] = (char)(b[i] - 32);
  }
  for (int i = 0; i < (int)a.length(); ++i) {
    if (a[i] > b[i]) {
      cout << 1 << endl;
      return 0;
    } else if (a[i] < b[i]) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << 0 << endl;
}
