Problem: Another feature of Shakespeare language is that the variables are named after characters of plays by Shakespeare, and all operations on them (value assignment, output etc.) look like a dialog with other characters. New values of variables are defined in a rather lengthy way, so a programmer should try to minimize their usage.

You have to print the given sequence of n integers. To do this, you have m variables and two types of operations on them:

  * variable=integer
  * print(variable)



Any of the m variables can be used as variable. Variables are denoted by lowercase letters between "a" and "z", inclusive. Any integer number can be used as integer.

Let's say that the penalty for using first type of operations equals to the number of set bits in the number integer. There is no penalty on using second type of operations. Find and output the program which minimizes the penalty for printing the given sequence of numbers.

Input

The first line of input contains integers n and m (1 ≤ n ≤ 250, 1 ≤ m ≤ 26). The second line contains the sequence to be printed. Each element of the sequence is an integer between 1 and 109, inclusive. The sequence has to be printed in the given order (from left to right).

Output

Output the number of lines in the optimal program and the optimal penalty. Next, output the program itself, one command per line. If there are several programs with minimal penalty, output any of them (you have only to minimize the penalty).

Examples

Input

7 2
1 2 2 4 2 1 2


Output

11 4
b=1
print(b)
a=2
print(a)
print(a)
b=4
print(b)
print(a)
b=1
print(b)
print(a)


Input

6 3
1 2 3 1 2 3


Output

9 4
c=1
print(c)
b=2
print(b)
a=3
print(a)
print(c)
print(b)
print(a)

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using std::max;
using std::min;
const int fin = 0, maxn = 300, maxt = maxn << 1, maxm = 130000;
const int INF = 1 << 30;
int N, M, S, T, W, m = 1, tot;
int a[maxn], b[maxn];
int fs[maxt], next[maxm], cap[maxm], cot[maxm], oth[maxm];
int q[maxt], dis[maxt], pren[maxt], pree[maxt];
bool v[maxt];
char bel[maxn], str[10000];
inline void add(int x, int y, int w, int f) {
  oth[++m] = y, cap[m] = w, cot[m] = f, next[m] = fs[x], fs[x] = m;
  oth[++m] = x, cap[m] = 0, cot[m] = -f, next[m] = fs[y], fs[y] = m;
}
bool spfa() {
  int i, head, tail, u, t;
  for (i = 1; i <= tot; ++i) dis[i] = INF, v[i] = 0;
  head = 0, tail = 1, q[1] = S, v[S] = 1, dis[S] = 0;
  while (head != tail) {
    if (++head, head == maxt) head = 0;
    u = q[head], v[u] = 0;
    for (i = fs[u]; i; i = next[i])
      if (cap[i])
        if (t = oth[i], dis[t] > dis[u] + cot[i]) {
          dis[t] = dis[u] + cot[i];
          pree[t] = i, pren[t] = u;
          if (!v[t]) {
            v[t] = 1;
            if (++tail, tail == maxt) tail = 0;
            q[tail] = t;
          }
        }
  }
  return dis[T] != INF;
}
void pre() {
  int i, t, j;
  scanf("%d%d", &N, &M);
  for (i = 1; i <= N; ++i)
    for (scanf("%d", a + i), t = a[i]; t; t >>= 1) b[i] += t & 1;
  W = 2 * N + 1, S = W + 1, tot = T = S + 1;
  add(S, W, M, 0);
  for (i = 1; i <= N; ++i) {
    add(S, i, 1, 0), add(i + N, T, 1, 0), add(W, i + N, 1, b[i]);
    for (j = i + 1; j <= N; ++j) add(i, j + N, 1, a[i] == a[j] ? 0 : b[j]);
  }
}
void sol() {
  int ans = 0, i, j, row = 0, len = 0;
  char src = 'a';
  while (spfa()) {
    ans += dis[T];
    for (i = T; i != S; i = pren[i]) --cap[pree[i]], ++cap[pree[i] ^ 1];
  }
  for (j = 1; j <= tot; ++j)
    for (i = fs[j]; i; i = next[i])
      if (!(i & 1) && !cap[i]) pren[oth[i]] = j;
  for (i = 1; i <= N; ++i) {
    j = pren[i + N];
    bel[i] = (j == W) ? src++ : bel[j];
    if (j == N + 1 || a[j] != a[i])
      ++row, len += sprintf(str + len, "%c=%d\n", bel[i], a[i]);
    ++row, len += sprintf(str + len, "print(%c)\n", bel[i]);
  }
  printf("%d %d\n%s", row, ans, str);
}
int main() {
  if (fin) {
    freopen("t.in", "r", stdin);
    freopen("t.out", "w", stdout);
  }
  pre();
  sol();
  return 0;
}