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