#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
  cin.tie(NULL);
}
typedef long long ll;
int main() {
  fast;
  string s, t;
  ll c = 0, x = 0;
  cin >> s >> t;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] >= 'A' && s[i] <= 'Z') s[i] = char(s[i] += 32);
    if (t[i] >= 'A' && t[i] <= 'Z') t[i] = char(t[i] += 32);
  }
  if (s == t)
    cout << "0";
  else if (s < t)
    cout << "-1";
  else
    cout << "1";
}
