#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  string x, y;
  cin >> x >> y;
  char ans[200];
  for (int i = 0; i < x.size(); i++) {
    if (y[i] == x[i]) {
      ans[i] = x[i];
    } else if (y[i] < x[i]) {
      ans[i] = y[i];
    } else {
      cout << -1 << '\n';
      return 0;
    }
  }
  for (int i = 0; i < x.size(); i++) {
    cout << ans[i];
  }
}
