#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
const int INF = 1e9 + 7;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  for (char &c : s1) {
    c = tolower(c);
  }
  for (char &c : s2) {
    c = tolower(c);
  }
  if (s1 == s2) {
    cout << 0;
    return 0;
  }
  if (s1 < s2)
    cout << -1;
  else
    cout << 1;
  return 0;
}
