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