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