#include <bits/stdc++.h>
using namespace std;
int main() {
  string x, z, y;
  cin >> x >> z;
  int n = x.length();
  for (int i = 0; i < n; i++) {
    if (z[i] > x[i]) {
      cout << "-1";
      return 0;
    } else {
      if (z[i] == x[i] && z[i] != 'z') {
        y.push_back(char(x[i] + 1));
      } else {
        y.push_back(char(z[i]));
      }
    }
  }
  cout << y;
  return 0;
}
