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