#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
string s, t;
int main(void) {
  cin >> s >> t;
  string ans;
  for (int i = 0; i < s.size(); ++i)
    if (s[i] >= t[i])
      ans.push_back(min(s[i], t[i]));
    else if (s[i] < t[i])
      return printf("-1"), 0;
  cout << ans;
}
