#include <bits/stdc++.h>
using namespace std;
map<int, bool> mp;
int const maxn = 1e5 + 5;
int const MOD = 1e9 + 7;
int i, j, k, l, n, m, a[maxn];
bool used[maxn];
string x, y, z;
int main() {
  cin >> x >> z;
  for (int i = 0; i < x.size(); i++) {
    if (x[i] < z[i]) return cout << -1, 0;
    if (x[i] == z[i]) {
      if (x[i] == 'z')
        y.push_back(char(x[i]));
      else
        y.push_back(char(x[i] + 1));
    } else
      y.push_back(char(z[i]));
  }
  cout << y;
}
