#include <bits/stdc++.h>
using namespace std;
int main() {
  string n, c;
  cin >> n >> c;
  int z = 0, flag = 0;
  while (z < n.length()) {
    n[z] = tolower(n[z]);
    c[z] = tolower(c[z]);
    if (n[z] == c[z]) {
      flag = 1;
    } else if (int(n[z]) > int(c[z])) {
      cout << "1";
      flag = 0;
      break;
    } else {
      cout << "-1";
      flag = 0;
      break;
    }
    z++;
  }
  if (flag == 1) {
    cout << "0";
  }
}
