#include <bits/stdc++.h>
using namespace std;
const long long MX = 1e6 + 9;
const int MAXN = 10100;
const long double pi = acos(-1);
const long long mod = 1e9 + 7;
const long double eps = 0.000000001;
int dx[] = {1, 0, 0, -1};
int dy[] = {0, -1, 1, 0};
char ans[MX];
int main() {
  bool ok = 0;
  string a, b;
  cin >> a >> b;
  int l = a.length();
  for (int i = 0; i < l; i++) {
    if (b[i] > a[i]) {
      ok = 1;
      break;
    }
    ans[i] = min(a[i], b[i]);
  }
  if (ok) {
    puts("-1");
  } else {
    for (int i = 0; i < l; i++) {
      cout << ans[i];
    }
  }
  return 0;
}
