#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int c1 = 0;
  int c2 = 0;
  int i = 0;
  for (; i < s1.length(); i++) {
    c1 += int(tolower(s1[i]));
    c2 += int(tolower(s2[i]));
    if (c1 == c2)
      continue;
    else if (c1 > c2) {
      cout << 1;
      break;
    } else {
      cout << -1;
      break;
    }
  }
  if (i == s1.length()) cout << 0;
}
