#include <bits/stdc++.h>
using namespace std;
int main() {
  string p, z;
  cin >> p;
  cin >> z;
  for (int i = 0; i < p.length(); i++) {
    if (p[i] >= 'A' && p[i] <= 'Z') p[i] = tolower(p[i]);
  }
  for (int i = 0; i < z.length(); i++) {
    if (z[i] >= 'A' && z[i] <= 'Z') z[i] = tolower(z[i]);
  }
  cout << p.compare(z);
  return 0;
}
