#include <bits/stdc++.h>
using namespace std;
int main() {
  char ch1[101], ch2[101];
  int i, sum = 0, sum1 = 0, sum2 = 0;
  cin >> ch1 >> ch2;
  for (i = 0; i < strlen(ch1); i++) {
    if (ch1[i] >= 97 && ch1[i] <= 122) {
      ch1[i] -= 32;
    }
    if (ch2[i] >= 97 && ch2[i] <= 122) {
      ch2[i] -= 32;
    }
    if (ch1[i] > ch2[i]) {
      cout << "1" << endl;
      break;
    } else if (ch1[i] < ch2[i]) {
      cout << "-1" << endl;
      break;
    }
  }
  if (ch1[i] == ch2[i]) {
    cout << "0" << endl;
  }
  return 0;
}
