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