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>
int son[2005], q[2005], d[2005], pre[2005], inq[2005], a[2005];
int link[150005], st[150005], next[150005], cap[150005], opp[150005],
    cost[150005];
int n, m, S, T, ll, maxflow, mincost;
void addedge(int x, int y, int z, int c) {
  link[++ll] = y;
  st[ll] = x;
  next[ll] = son[x];
  son[x] = ll;
  cap[ll] = z;
  cost[ll] = c;
  opp[ll] = ll + 1;
  link[++ll] = x;
  st[ll] = y;
  next[ll] = son[y];
  son[y] = ll;
  cap[ll] = 0;
  cost[ll] = -c;
  opp[ll] = ll - 1;
}
int spfa(int s) {
  int h = 0, t = 1, i, j, p;
  for (int i = 0; i <= n; ++i) d[i] = (1 << 29);
  for (int i = 0; i <= n; ++i) inq[i] = 0;
  d[S] = 0;
  q[1] = S;
  inq[S] = 1;
  while (h != t) {
    h = h < n ? h + 1 : 1;
    i = q[h];
    inq[i] = 0;
    for (p = son[i]; p != -1; p = next[p]) {
      j = link[p];
      if (d[i] + cost[p] < d[j] && cap[p]) {
        d[j] = d[i] + cost[p];
        pre[j] = p;
        if (!inq[j]) t = t < n ? t + 1 : 1, q[t] = j, inq[j] = 1;
      }
    }
  }
  return d[T] <= 0 ? 1 : 0;
}
void update() {
  int p, flow = (1 << 29);
  for (p = T; p != S; p = st[p]) {
    p = pre[p];
    if (cap[p] < flow) flow = cap[p];
  }
  maxflow += flow;
  for (p = T; p != S; p = st[p]) {
    p = pre[p];
    mincost += cost[p] * flow;
    cap[p] -= flow;
    cap[opp[p]] += flow;
  }
}
int ans = 0;
char val[2005];
int main() {
  int nn, x, y, z, w;
  ll = 0;
  scanf("%d%d", &nn, &m);
  n = nn + nn + 1;
  S = 0;
  T = nn + nn + 1;
  memset(son, -1, sizeof(int) * (n + 1));
  for (int i = 1; i <= nn; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= nn; ++i)
    addedge(S, i, 1, __builtin_popcount(a[i])), addedge(i, nn + i, 1, -10000),
        addedge(nn + i, T, 1, 0);
  for (int i = 1; i < nn; ++i)
    for (int j = i + 1; j <= nn; ++j)
      if (a[i] == a[j])
        addedge(i + nn, j, 1, 0);
      else
        addedge(i + nn, j, 1, __builtin_popcount(a[j]));
  maxflow = mincost = 0;
  for (int i = 1; i <= m; ++i)
    if (!spfa(S))
      break;
    else
      update();
  mincost += nn * 10000;
  char cur = 'a';
  for (int i = 1; i <= nn; ++i)
    for (int p = son[i]; p != -1; p = next[p])
      if (cap[p] && !(p & 1))
        if (!link[p])
          ans += 2, val[i] = cur++;
        else {
          if (a[link[p] - nn] == a[i])
            ++ans;
          else
            ans += 2;
          val[i] = val[link[p] - nn];
        }
  printf("%d %d\n", ans, mincost);
  for (int i = 1; i <= nn; ++i) {
    for (int p = son[i]; p != -1; p = next[p])
      if (cap[p] && !(p & 1))
        if (!link[p] || a[link[p] - nn] != a[i])
          printf("%c=%d\n", val[i], a[i]);
    printf("print(%c)\n", val[i]);
  }
  return 0;
}