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