#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string a, b;
  cin >> a >> b;
  transform(a.begin(), a.end(), a.begin(), ::toupper);
  transform(b.begin(), b.end(), b.begin(), ::toupper);
  if (a.compare(b) < 0)
    cout << -1;
  else if (a.compare(b) > 0)
    cout << 1;
  else
    cout << 0;
  return 0;
}
