#include <bits/stdc++.h>
char s1[105], s2[105];
bool f;
int main() {
  scanf("%s%s", s1, s2);
  for (int i = 0; s1[i]; ++i)
    f |= s1[i]<s2[i], s1[i] = s1[i]> s2[i] ? s2[i] : s1[i];
  puts(f ? "-1" : s1);
  return 0;
}
