#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[150], b[150];
  int c, d, e, f, g, x, y, z;
  gets(a);
  gets(b);
  c = strlen(a);
  for (x = 0; x < c; x++) {
    if (a[x] >= 'A' && a[x] <= 'Z') a[x] = a[x] + ('a' - 'A');
    if (b[x] >= 'A' && b[x] <= 'Z') b[x] = b[x] + ('a' - 'A');
  }
  if (strcmp(a, b) == 0)
    cout << "0" << endl;
  else if (strcmp(a, b) > 0)
    cout << "1" << endl;
  else
    cout << "-1" << endl;
  return 0;
}
