#include <bits/stdc++.h>
int main() {
  char a[110], b[110], c[110] = {};
  int i, len, x, y, ya = 0;
  scanf("%s\n%s", a, b);
  len = strlen(a);
  for (i = 0; i < len; i++) {
    x = a[i];
    y = b[i];
    if (x == y)
      c[i] = x;
    else if (x > y)
      c[i] = y;
    else {
      ya = 1;
      break;
    }
  }
  if (ya)
    printf("-1\n");
  else
    printf("%s\n", c);
  return 0;
}
