#include <bits/stdc++.h>
using namespace std;
int main() {
  char x[110], y[110], z[110];
  cin >> x;
  cin >> y;
  int i, len = strlen(x);
  for (i = 0; i < len; i++) {
    if (x[i] < y[i]) {
      cout << -1;
      return 0;
    } else if (x[i] == y[i]) {
      if (x[i] == 'z')
        z[i] = x[i];
      else
        z[i] = x[i] + 1;
    } else
      z[i] = y[i];
  }
  z[i] = '\0';
  cout << z;
  return 0;
}
