#include <bits/stdc++.h>
using namespace std;
int main() {
  char x[105], y[105], z[105];
  int k;
  cin >> x >> y;
  bool flag = true;
  for (k = 0; x[k] != '\0'; k++) {
    if (x[k] == y[k])
      z[k] = x[k];
    else if (x[k] > y[k])
      z[k] = y[k];
    else {
      cout << "-1";
      flag = false;
      break;
    }
  }
  z[k] = '\0';
  if (flag) cout << z;
  return 0;
}
