#include <bits/stdc++.h>
using namespace std;
char x[105], y[105], z[105];
int main() {
  scanf("%s%s", x, y);
  int len = strlen(x);
  for (int i = 0; i < len; i++) {
    if (x[i] < y[i]) {
      printf("-1\n");
      return 0;
    }
    if (x[i] == y[i]) {
      z[i] = x[i];
    } else {
      z[i] = y[i];
    }
  }
  z[len] = '\0';
  printf("%s\n", z);
  return 0;
}
