#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  transform(s1.begin(), s1.end(), s1.begin(), ::toupper);
  transform(s2.begin(), s2.end(), s2.begin(), ::toupper);
  int compInt = s1.compare(s2);
  if (compInt < 0) cout << -1;
  if (compInt == 0) cout << 0;
  if (compInt > 0) cout << 1;
  return 0;
}
