#include <bits/stdc++.h>
using ll = long long int;
using vi = std::vector<int>;
using ii = std::pair<int, int>;
using vii = std::vector<ii>;
const int N = 1010101;
const int MD = 1e9 + 7;
char a[N];
char b[N];
void read_input() {
  scanf("%s", (a));
  ;
  scanf("%s", (b));
  ;
}
void reset();
int ans = 0;
void solve() {
  reset();
  int len = (int)strlen(a);
  for (int i = 0; i < (len); ++i) a[i] = (char)tolower(a[i]);
  for (int i = 0; i < (len); ++i) b[i] = (char)tolower(b[i]);
  fprintf(stderr, "DBG: %s %s\n", "a", a);
  ;
  fprintf(stderr, "DBG: %s %s\n", "b", b);
  ;
  for (int i = 0; i < (len); ++i) {
    if (a[i] == b[i]) continue;
    if (a[i] < b[i])
      ans = -1;
    else
      ans = 1;
    break;
  }
}
void reset() {}
void print_ans() {
  printf("%d ", (ans));
  ;
}
int main() {
  int t = 1;
  for (int tc = (1); tc < (t + 1); ++tc) {
    read_input();
    solve();
    print_ans();
  }
  return 0;
}
