#include <bits/stdc++.h>
using namespace std;
bool st1[26];
bool st2[26];
int main() {
  int n, t;
  cin >> n >> t;
  string s1, s2;
  cin >> s1;
  cin >> s2;
  for (char &c : s1) st1[c - 'a'] = true;
  for (char &c : s2) st2[c - 'a'] = true;
  int ch1 = 0, ch2 = 0;
  for (char c = 'a'; c <= 'z'; c++) {
    if (st1[c - 'a'] && !st2[c - 'a'])
      ch1++;
    else if (!st1[c - 'a'] && st2[c - 'a'])
      ch2++;
  }
  if (!(ch1 == t && ch2 == t)) {
    cout << -1 << endl;
    return 0;
  }
  string ans = "";
  int size = 0;
  for (char c = 'a'; c <= 'z'; c++) {
    if (t == 0) break;
    if (!st1[c - 'a'] && !st2[c - 'a']) {
      ans += c;
      size++;
      t--;
    }
  }
  int t1 = t, t2 = t;
  for (char c = 'a'; c <= 'z'; c++) {
    if (size == n) break;
    if (t1 == 0 && t2 == 0 && st1[c - 'a'] && st2[c - 'a']) {
      while (size < n) {
        ans += c;
        size++;
      }
    } else if (t1 > 0 && st1[c - 'a'] && !st2[c - 'a']) {
      ans += c;
      size++;
      t1--;
    } else if (t2 > 0 && !st1[c - 'a'] && st2[c - 'a']) {
      ans += c;
      size++;
      t2--;
    }
  }
  if (t1 == 0 && t2 == 0 && size == n)
    cout << ans << endl;
  else
    cout << -1 << endl;
  return 0;
}
