#include <bits/stdc++.h>
using namespace std;
vector<string> vec_splitter(string second) {
  second += ',';
  vector<string> res;
  while (!second.empty()) {
    res.push_back(second.substr(0, second.find(',')));
    second = second.substr(second.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
long long powermod(long long base, long long exp, long long mod) {
  long long result = 1;
  while (exp != 0) {
    if ((exp % 2) == 1) {
      result = (result * base) % mod;
    }
    base = (base * base) % mod;
    exp /= 2;
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tt = clock();
  string a, b;
  cin >> a >> b;
  transform(a.begin(), a.end(), a.begin(), ::tolower);
  transform(b.begin(), b.end(), b.begin(), ::tolower);
  for (int i = 0; i < min(a.size(), b.size()); i++) {
    if (a[i] - 'a' == b[i] - 'a') {
      continue;
    } else if (a[i] - 'a' < b[i] - 'a') {
      cout << -1 << endl;
      return 0;
    } else {
      cout << 1 << endl;
      return 0;
    }
  }
  if (a.size() < b.size()) {
    cout << -1 << endl;
  } else if (a.size() > b.size()) {
    cout << 1 << endl;
  } else {
    cout << 0 << endl;
  }
  cerr << "TIME = " << (double)1.0 * (clock() - tt) / CLOCKS_PER_SEC
       << " seconds" << endl;
  return 0;
}
