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