#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  string ans = "";
  bool in = false;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == 'z' && b[i] == 'z') {
      ans += 'z';
      continue;
    }
    if (a[i] == b[i]) {
      ans += a[i] + 1;
    } else if (a[i] > b[i]) {
      ans += b[i];
    } else {
      cout << -1 << "\n";
      in = true;
      break;
    }
  }
  if (!in) {
    cout << ans << "\n";
  }
  return 0;
}
