#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[105], b[105];
  int c, d;
  cin >> a >> b;
  d = strlen(a);
  for (int i = 0; i < d; i++) {
    if (a[i] >= 'A' && a[i] <= 'Z') {
      a[i] = a[i] - 'A' + 'a';
    }
    if (b[i] >= 'A' && b[i] <= 'Z') {
      b[i] = b[i] - 'A' + 'a';
    }
    if (a[i] != b[i]) {
      if (a[i] > b[i])
        c = 1;
      else if (a[i] < b[i])
        c = -1;
      break;
    } else
      c = 0;
  }
  cout << c << endl;
  return 0;
}
