One of the Hedgehog and his friend's favorite entertainments is to take some sentence or a song and replace half of the words (sometimes even all of them) with each other's names.

The friend's birthday is approaching and the Hedgehog decided to make a special present to his friend: a very long song, where his name will be repeated many times. But try as he might, he can't write a decent song!

The problem is that the Hedgehog has already decided how long the resulting sentence should be (i.e. how many letters it should contain) and in which positions in the sentence the friend's name should occur, and it must not occur in any other position in the sentence. Besides, the Hedgehog decided to limit himself to using only the first K letters of an English alphabet in this sentence (so it will be not even a sentence, but one long word).

The resulting problem is indeed quite complicated, that's why the Hedgehog asks you to help him and write a program that will make the desired word by the given name P, the length N of the required word, the given positions of the occurrences of the name P in the desired word and the alphabet's size K. Note that the occurrences of the name can overlap with each other.

Input

The first line contains numbers N and K which are the length of the required string and the alphabet size accordingly. The limitations are: 1 ≤ N ≤ 100, 2 ≤ K ≤ 26.

The second line contains the name P which is a non-empty string whose length does not exceed N characters. The string consists only of the first K lowercase symbols of an English alphabet.

The third line contains the string of length N - length(P) + 1, consisting only of numbers zero and one. A number one in the i-th position means that an occurrence of the name P should start from i-th position of the desired word, while a zero means that there is no occurrence starting here. 

Output

Print the desired word S. If there are several answers, print any of them.

If there is no solution, then print "No solution".

Examples

Input

5 2
aba
101


Output

ababa

Input

5 2
a
10001


Output

abbba

Input

6 2
abba
101


Output

No solution
#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T POW(T B, T P) {
  if (P == 0) return 1;
  if (P & 1)
    return B * POW(B, P - 1);
  else
    return SQR(POW(B, P / 2));
}
template <class T>
inline T BMOD(T p, T e, T m) {
  T ret = 1;
  while (e) {
    if (e & 1) ret = (ret * p) % m;
    p = (p * p) % m;
    e >>= 1;
  }
  return (T)ret;
}
template <typename T>
inline T ModInv(T b, T m) {
  return BMOD(b, m - 2, m);
}
template <typename T>
inline T ABS(T a) {
  if (a < 0)
    return -a;
  else
    return a;
}
template <typename T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <typename T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};
int n, k;
string s, p;
int vis[111], mp[30];
int ed[111];
int main() {
  scanf("%d%d", &n, &k);
  cin >> s >> p;
  memset(vis, -1, sizeof vis);
  for (int i = 0; i < s.size(); i++) mp[s[i] - 'a'] = 1;
  int fl = 0;
  for (int i = 0; i < p.size(); i++) {
    if (p[i] == '1') {
      int ii = i;
      for (int j = 0; j < s.size(); j++, ii++) {
        if (vis[ii] == -1 || vis[ii] == s[j] - 'a')
          vis[ii] = s[j] - 'a';
        else {
          fl = 1;
          break;
        }
      }
      if (fl) break;
    }
  }
  for (int i = 0; i < n; i++) {
    if (vis[i] == -1) ed[i] = 1;
  }
  int cn = 0;
  if (fl) {
    cout << "No solution" << endl;
  } else {
    int id = 0;
    for (int i = 0; i < n; i++) {
      if (vis[i] == -1) {
        if (k == 1) {
          printf("No solution\n");
          return 0;
        }
        if (id == s.size() - 1 || vis[i + 1] != -1 || vis[i - 1] != -1) {
          for (int j = 0; j < k; j++) {
            if (j != s[id] - 'a') vis[i] = j;
          }
          if (vis[i] == -1) {
            printf("No solution\n");
            return 0;
          }
          id = 0;
        } else
          vis[i] = s[id] - 'a', id++;
        if (id == s.size()) id = 0;
      }
    }
    for (int i = 0; i < p.size(); i++) {
      string ss = "";
      for (int j = i; j < i + s.size(); j++) {
        ss += ('a' + vis[j]);
      }
      if (ss == s) {
        if (p[i] != '1') {
          int fl = 0;
          for (int j = i; j < i + s.size(); j++) {
            if (ed[j]) {
              for (int l = 0; l < k; l++) {
                if (l != vis[j]) {
                  fl = 1;
                  vis[j] = l;
                  break;
                }
              }
              if (fl) break;
            }
          }
          if (fl == 0) {
            cout << "No solution\n";
            return 0;
          }
        }
      }
    }
    for (int i = 0; i < n; i++) {
      printf("%c", vis[i] + 'a');
    }
    puts("");
  }
  return 0;
}
