#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  string ans = "";
  for (int i = 0; i < a.size(); i++) {
    if (b[i] > a[i]) {
      cout << "-1" << endl;
      return 0;
    } else {
      ans.push_back(min(a[i], b[i]));
    }
  }
  cout << ans << endl;
  return 0;
}
