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