#include <bits/stdc++.h>
#pragma GCC optimize(3)
#pragma G++ optimize(3)
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  string s1, s2;
  cin >> s1 >> s2;
  transform(s1.begin(), s1.end(), s1.begin(), ::tolower);
  transform(s2.begin(), s2.end(), s2.begin(), ::tolower);
  if (s1 < s2)
    cout << -1 << endl;
  else if (s2 < s1)
    cout << 1 << endl;
  else
    cout << 0 << endl;
  return 0;
}
