#include <bits/stdc++.h>
int main(void) {
  char x[101], y[101], z[101];
  int i, j, t, f;
  scanf("%s", x);
  scanf("%s", z);
  for (i = 0, f = 0; i < strlen(x); i++) {
    if (x[i] < z[i]) {
      f = 1;
      break;
    } else if (x[i] = z[i])
      y[i] = x[i];
    else
      y[i] = z[i];
  }
  y[i] = '\0';
  if (f)
    printf("-1\n");
  else
    printf("%s", y);
  return 0;
}
