#include <bits/stdc++.h>
using namespace std;
const int MX = 1e5 + 5;
char A[MX], B[MX], C[MX];
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    memset(C, 0, sizeof(C));
    scanf("%s%s", A + 1, B + 1);
    m = n - m;
    int sum = 0;
    for (int i = 1; i <= n; i++) {
      if (A[i] == B[i]) sum++;
    }
    if ((n - sum) / 2 + sum < m) {
      printf("-1\n");
      continue;
    }
    int k = min(m, sum);
    for (int i = 1, j = 1; j <= k && i <= n; i++) {
      if (A[i] == B[i]) C[i] = A[i], j++;
    }
    int s = m - k;
    for (int i = 1, j = 1; j <= s && i <= n; i++) {
      if (A[i] != B[i] && !C[i]) C[i] = A[i], j++;
    }
    for (int i = 1, j = 1; j <= s && i <= n; i++) {
      if (A[i] != B[i] && !C[i]) C[i] = B[i], j++;
    }
    for (int i = 1; i <= n; i++) {
      if (!C[i])
        for (int j = 'a'; j <= 'z'; j++) {
          if (A[i] != j && B[i] != j) {
            C[i] = j;
            break;
          }
        }
    }
    printf("%s\n", C + 1);
  }
  return 0;
}
