#include <bits/stdc++.h>
using namespace std;
int main() {
  string x, y;
  cin >> x >> y;
  int length = x.length();
  for (int i = 0; i < length; i++) {
    int c = x[i];
    if (islower(c)) x[i] = toupper(c);
  }
  int length1 = y.length();
  for (int i = 0; i < length1; i++) {
    int c = y[i];
    if (islower(c)) y[i] = toupper(c);
  }
  int xx = 0, yy = 0;
  for (int i = 0; i < length; i++) {
    int r = int(x[i]);
    xx += r;
    int d = int(y[i]);
    yy += d;
  }
  cout << x.compare(y);
}
