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