Decoding
During a recent class test, Maria Ivanovna intercepted a note from Olya to Sasha. Eager to uncover its contents, she discovered the note was encrypted. The students use a simple substitution cipher where each letter in the original message is replaced by another letter. Identical letters are consistently replaced by the same letter, while different letters are replaced by different ones.
Maria Ivanovna suspects the note contains test answers, as its length matches the string of correct answers. However, she knows Olya's answers might not be entirely accurate. For each question, there are K possible answers. Naturally, Maria Ivanovna knows the correct answers.
She wants to decrypt the note to maximize the number of correct answers Olya could have given. Pressed for time, she has asked for your assistance with this task.
Input
The first line contains two integers: N (1 ≤ N ≤ 2000000), the length of each string, and K, the number of possible answers for each question (1 ≤ K ≤ 52). The answers are represented by the sequence abcde...xyzABCDE...XYZ. For example, if K = 6, the possible answers are abcdef, and if K = 30, they are abcde...xyzABCD.
The second line contains the encrypted note, a string of lowercase and uppercase Latin letters.
The third line contains the correct answers, a string of the same length, also consisting of lowercase and uppercase Latin letters.
Output
On the first line, output a single number — the maximum number of correct answers Olya could have.
On the second line, provide the decryption — a string of length K, where each letter from the students' cipher indicates the corresponding answer. If multiple decryptions yield the same number of correct answers, you may output any one of them.