#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const long long inf = 1e12;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string a, b;
  cin >> a >> b;
  int n = a.size();
  string c = a;
  for (int i = 0; i < n; i++) {
    if (b[i] > a[i]) {
      cout << -1;
      exit(0);
    }
    if (a[i] > b[i]) c[i] = b[i];
  }
  cout << c;
  return 0;
}
