#include <bits/stdc++.h>
using namespace std;
char z[100];
string x, y;
int main() {
  int i, j;
  cin >> x;
  cin >> y;
  int len = x.size();
  for (i = 0; i < len; i++) {
    if (x[i] < y[i]) {
      cout << -1;
      return 0;
    }
    if (x[i] > y[i]) {
      z[i] = y[i];
    }
    if (x[i] == y[i]) {
      z[i] = x[i];
    }
  }
  puts(z);
  return 0;
}
