#include <bits/stdc++.h>
using namespace std;
int main() {
  int l1, l2;
  string ch1, ch2;
  cin >> ch1;
  cin >> ch2;
  l1 = ch1.size();
  l2 = ch2.size();
  for (int i = 0; i < l1; i = i + 1) {
    if (ch1[i] >= 97 && ch1[i] <= 122) ch1[i] = ch1[i] - 32;
  }
  for (int i = 0; i < l2; i = i + 1) {
    if (ch2[i] >= 97 && ch2[i] <= 122) ch2[i] = ch2[i] - 32;
  }
  if (ch1 > ch2)
    cout << "1" << endl;
  else if (ch1 < ch2)
    cout << "-1" << endl;
  else if (ch1 == ch2)
    cout << "0" << endl;
  return 0;
}
