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 a, b, c, d, e, f, g[1005], h, i, j, k;
struct node {
  int u, v, w, va;
  int next;
};
struct node G[1000005];
int end[1005];
int D[1005];
int que[100005], l, r;
int v[1005];
int qq[1005];
int from[1005];
int Y[1005];
int an1, an2;
int Min(int x, int y) {
  if (x < y) return x;
  return y;
}
void Add_Edge(int u, int v, int w, int va) {
  G[++e].u = u;
  G[e].v = v;
  G[e].w = w;
  G[e].va = va;
  G[e].next = end[u];
  end[u] = e;
}
int In(int x) {
  int kk = 0;
  while (x != 0) {
    kk++;
    x -= (x & (-x));
  }
  return kk;
}
void Change(int x, int y) {
  G[x].w -= y;
  if (x & 1)
    x++;
  else
    x--;
  G[x].w += y;
}
int Find_Way(int q, int z) {
  int ii, jj, kk;
  for (ii = 1; ii <= a + a + 3; ii++) D[ii] = 1 << 23;
  for (ii = 1; ii <= a + a + 3; ii++) qq[ii] = -1;
  memset(v, 0, sizeof(v));
  D[q] = 0;
  l = 0;
  r = 1;
  que[1] = q;
  v[1] = 1;
  while (l < r) {
    l++;
    jj = end[que[l]];
    while (jj) {
      if (G[jj].w > 0 && D[que[l]] + G[jj].va < D[G[jj].v]) {
        D[G[jj].v] = D[que[l]] + G[jj].va;
        qq[G[jj].v] = jj;
        if (v[G[jj].v] == 0) {
          v[G[jj].v] = 1;
          que[++r] = G[jj].v;
        }
      }
      jj = G[jj].next;
    }
    v[que[l]] = 0;
  }
  if (D[z] < 0) return 1;
  return 0;
}
int L(int q, int z) {
  int ii, jj, kk;
  int R;
  kk = 0;
  R = 0;
  jj = 0;
  while (Find_Way(q, z)) {
    kk = (1 << 23);
    d++;
    for (ii = z; ii != q; ii = G[qq[ii]].u) kk = Min(kk, G[qq[ii]].w);
    for (ii = z; ii != q; ii = G[qq[ii]].u) Change(qq[ii], kk);
    R += kk;
  }
  return R;
}
int main() {
  scanf("%d%d", &a, &b);
  for (i = 1; i <= a; i++) scanf("%d", &g[i]);
  Add_Edge(1, 2, b, 0);
  Add_Edge(2, 1, 0, 0);
  for (i = 1; i <= a; i++) {
    h = In(g[i]);
    Add_Edge(2, 2 + i, 1, h);
    Add_Edge(2 + i, 2, 0, -h);
    Add_Edge(2 + i, 2 + i + a, 1, -(1 << 23));
    Add_Edge(2 + i + a, 2 + i, 0, (1 << 23));
    Add_Edge(2 + i + a, 3 + a + a, 1, 0);
    Add_Edge(3 + a + a, 2 + i + a, 0, 0);
  }
  for (i = 1; i <= a; i++)
    for (j = i + 1; j <= a; j++)
      if (g[i] == g[j]) {
        Add_Edge(2 + i + a, 2 + j, 1, 0);
        Add_Edge(2 + j, 2 + i + a, 0, 0);
      } else {
        h = In(g[j]);
        Add_Edge(2 + i + a, 2 + j, 1, h);
        Add_Edge(2 + j, 2 + i + a, 0, -h);
      }
  k = L(1, 3 + a + a);
  for (i = 1; i <= a; i++) {
    j = end[2 + i];
    while (j) {
      if (j & 1)
        k = j + 1;
      else
        k = j - 1;
      if (G[k].w == 0) {
        if (G[k].u == 2)
          from[i] = -5;
        else
          from[i] = G[k].u - a - 2;
        break;
      }
      j = G[j].next;
    }
  }
  c = 0;
  an1 = 0;
  an2 = 0;
  for (i = 1; i <= a; i++) {
    if (from[i] == -5) {
      c++;
      Y[i] = c;
      an2 += In(g[i]);
      an1 += 2;
      continue;
    } else
      Y[i] = Y[from[i]];
    if (g[i] != g[from[i]]) {
      an1++;
      an2 += In(g[i]);
    }
    an1++;
  }
  printf("%d %d\n", an1, an2);
  c = 0;
  an1 = 0;
  an2 = 0;
  for (i = 1; i <= a; i++) {
    if (from[i] == -5) {
      c++;
      Y[i] = c;
      printf("%c=%d\n", c + 'a' - 1, g[i]);
      an2 += In(g[i]);
      printf("print(%c)\n", c + 'a' - 1);
      an1 += 2;
      continue;
    } else
      Y[i] = Y[from[i]];
    if (g[i] != g[from[i]]) {
      an1++;
      printf("%c=%d\n", Y[i] + 'a' - 1, g[i]);
      an2 += In(g[i]);
    }
    an1++;
    printf("print(%c)\n", Y[i] + 'a' - 1);
  }
  return 0;
}