Codeforces Round 324 (Div. 2)
C
Marina and Vasya
Codeforces
1700
原题
← BD →
翻译中…

Marina loves strings of the same length and Vasya loves when there is a third string, different from them in exactly $*t*$ characters. Help Vasya find at least one such string.

翻译中…

More formally, you are given two strings $*s*_{1}$, $*s*_{2}$ of length $*n*$ and number $*t*$. Let's denote as $*f*(*a*, *b*)$ the number of characters in which strings $*a*$ and $*b*$ are different. Then your task will be to find any string $*s*_{3}$ of length $*n*$, such that $*f*(*s*_{1}, *s*_{3}) = *f*(*s*_{2}, *s*_{3}) = *t*$. If there is no such string, print $- 1$.

翻译中…

Input

翻译中…

The first line contains two integers $*n*$ and $*t*$ ($1 ≤ *n* ≤ 10^{5}$, $0 ≤ *t* ≤ *n*$).

翻译中…

The second line contains string $*s*_{1}$ of length $*n*$, consisting of lowercase English letters.

翻译中…

The third line contain string $*s*_{2}$ of length $*n*$, consisting of lowercase English letters.

翻译中…

Output

翻译中…

Print a string of length $*n*$, differing from string $*s*_{1}$ and from $*s*_{2}$ in exactly $*t*$ characters. Your string should consist only from lowercase English letters. If such string doesn't exist, print -1.

翻译中…

样例

Input #1
3 2
abc
xyc
Output #1
ayd
InputCopy OutputCopy
Input #2
1 0
c
b
Output #2
-1
InputCopy OutputCopy
题目信息
题号
584C
时间限制
1 s
内存限制
256 MB
标签
构造
贪心
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。