#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

Consider a set of k strings { S1, S2, ..., Sk } where every character used in the k strings is either a space or any of the 26 characters in { 'a', 'b', 'c', ..., 'z' }. For some constants l and d, our aim is to compute an (l, d)-pattern for { S1, S2, ..., Sk }. An (l, d)-pattern is a length-l string W = W[1]W[2] ... W[l] which satisfies the following property:

For every string Si (i = 1, 2, ..., k), there exists a length-l substring X = X[1]X[2] ... X[l] of Si such that the hamming distance of X and W is less than or equal to d. (The hamming distance of X and W is the number of pairs of (X[j], W[j]) such that X[j] ≠ W[j]) for j = 1, 2, ..., l.)

In this task, you are given numbers l and d and a set of strings; you need to compute an (l, d)-pattern for the given set of strings. You can assume that an (l, d)-pattern exists and is unique.

**Example 1**

Consider the following 3 strings, the corresponding (3,0)-pattern is "oil".

* oil is expensive

* we have three oilers

* be more oily

**Example 2**

Consider the following 4 strings, the corresponding (5,1)-pattern is "apple".

* you have two applas

* i am an ppple

* we are acples

* adples are good for health

## Input

The first line contains two integers l and d separated by a space, where 1 ≤ l ≤ 10, 0 ≤ d ≤ 2. The second line contains the integer k, where 1 ≤ k ≤ 30. The remaining k lines contain the k strings S1, S2, ..., Sk. (Each string is of length at most 50).

## Output

The output file contains a string of length l. This string represents an (l, d)-pattern for the set of strings and l and d given in the input file. The input is always such that there exists exacly one (l, d)-pattern.

## Sample Input 1

5 1 4 you have two applas i am an ppple we are acples adples are good for health

## Sample Output 1

apple

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 100 | 5 | 10s | 32MB | Average |

2 | 0 | 1 | 10s | 32MB | Average |

### Judge Compile Command

g++-8 ans.cpp -o wordword -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512