#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, t1;
  cin >> n >> t;
  t1 = n - t;
  string a, b, res;
  cin >> a >> b;
  for (int i = 0; i < n; i++) res += " ";
  set<int> f;
  for (int i = 0; i < n; i++) f.insert(i);
  for (int i = 0; i < n; i++) {
    if (a[i] == b[i] && t1 > 0) t1--, res[i] = a[i], f.erase(i);
  }
  while (t1 > 0 && !f.empty()) {
    res[*f.begin()] = a[*f.begin()];
    f.erase(*f.begin());
    if (!f.empty()) {
      res[*f.begin()] = b[*f.begin()];
      f.erase(*f.begin());
      t1--;
    }
  }
  while (!f.empty()) {
    for (char i = 'a'; i <= 'z'; i++)
      if (a[*f.begin()] != i && b[*f.begin()] != i) {
        res[*f.begin()] = i, f.erase(f.begin());
        break;
      }
  }
  int q = 0, w = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] != res[i]) q++;
    if (b[i] != res[i]) w++;
  }
  if (q != t || w != t) return cout << -1, 0;
  cout << res;
}
