#include <bits/stdc++.h>
using namespace std;
void kill() {
  puts("-1");
  exit(0);
}
int N, M;
string S, T;
string ans;
vector<int> diff, same;
char getdiff(char c1, char c2) {
  for (char c = 'a';; c++) {
    if (c != c1 && c != c2) {
      return c;
    }
  }
}
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  ios::sync_with_stdio(false);
  cin >> N >> M >> S >> T;
  for (int i = 0; i < N; i++) {
    if (S[i] == T[i]) {
      same.push_back(i);
    } else {
      diff.push_back(i);
    }
  }
  int ndiff = diff.size(), nsame = same.size();
  for (int i = 0; i <= nsame; i++) {
    int rdiff = M - i;
    if (rdiff < (ndiff + 1) / 2 || rdiff > ndiff) {
      continue;
    }
    ans.resize(N);
    for (int j = 0; j < i; j++) {
      int ind = same[j];
      ans[ind] = getdiff(S[ind], T[ind]);
    }
    for (int j = i; j < nsame; j++) {
      int ind = same[j];
      ans[ind] = S[ind];
    }
    int nboth = 2 * rdiff - ndiff;
    for (int j = 0; j < nboth; j++) {
      int ind = diff[j];
      ans[ind] = getdiff(S[ind], T[ind]);
    }
    int midpt = (nboth + ndiff) / 2;
    for (int j = nboth; j < midpt; j++) {
      int ind = diff[j];
      ans[ind] = S[ind];
    }
    for (int j = midpt; j < ndiff; j++) {
      int ind = diff[j];
      ans[ind] = T[ind];
    }
    cout << ans << endl;
    return 0;
  }
  kill();
}
