#include <bits/stdc++.h>
using namespace std;
int main() {
  string x, y;
  while (cin >> x) {
    cin >> y;
    int xs = x.size();
    char x1[xs];
    char y1[xs];
    for (int i = 0; i < x.size(); i++) {
      if (x[i] <= 90) x[i] = x[i] + 32;
      if (y[i] <= 90) y[i] = y[i] + 32;
    }
    for (int i = 0; i < xs; i++) {
      x1[i] = x[i];
      y1[i] = y[i];
    }
    if (lexicographical_compare(x1, x1 + xs, y1, y1 + xs))
      cout << "-1" << endl;
    else if (lexicographical_compare(y1, y1 + xs, x1, x1 + xs))
      cout << "1" << endl;
    else
      cout << "0" << endl;
  }
  return 0;
}
