#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n;
  string s;
  cin >> s;
  string t;
  cin >> t;
  for (i = 0; s[i] != '\0'; i++) {
    if (s[i] >= 'A' && s[i] <= 'Z') s[i] = s[i] + 32;
    if (t[i] >= 'A' && t[i] <= 'Z') t[i] = t[i] + 32;
  }
  int found = 0;
  for (i = 0; s[i] != '\0'; i++) {
    if (s[i] > t[i]) {
      found = 1;
      break;
    } else if (t[i] > s[i]) {
      found = -1;
      break;
    } else {
      found = 0;
    }
  }
  cout << found;
  return 0;
}
