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 namespace std;
int st[610], aim[(300010)], nxt[(300010)], ln;
int flow[(300010)], con[(300010)], cost[(300010)];
int inq[610], dis[610];
int g[610], e[610];
int q[610];
int a[610];
int d[610 << 3], tag[610 << 3], dn;
int num[610];
int N, source, remit;
int ans;
int n, m;
void in_edge(int x, int y, int f, int c) {
  aim[ln] = y;
  nxt[ln] = st[x];
  flow[ln] = 0;
  con[ln] = f;
  cost[ln] = c;
  st[x] = ln++;
  aim[ln] = x;
  nxt[ln] = st[y];
  flow[ln] = con[ln] = 0;
  cost[ln] = -c;
  st[y] = ln++;
}
int calc(int x) {
  int ret = 0;
  while (x) ret += (x & 1), x >>= 1;
  return ret;
}
int spfa() {
  int qn = 1;
  for (int i = 0; i <= remit; i++) dis[i] = (10000000);
  memset(inq, 0, sizeof(inq));
  dis[source] = 0;
  inq[source] = 1;
  q[0] = source;
  for (int p = 0; p != qn;) {
    int u = q[p];
    p++;
    if (p == 610) p = 0;
    inq[u] = 0;
    for (int i = st[u]; i != -1; i = nxt[i])
      if (flow[i] < con[i]) {
        int v = aim[i];
        if (dis[u] + cost[i] < dis[v]) {
          dis[v] = dis[u] + cost[i];
          g[v] = u;
          e[v] = i;
          if (!inq[v]) {
            inq[v] = 1;
            q[qn] = v;
            ++qn;
            if (qn == 610) qn = 0;
          }
        }
      }
  }
  if (dis[remit] == (10000000)) return 0;
  int delta = (10000000);
  for (int i = remit; i != source; i = g[i])
    delta = min(delta, con[e[i]] - flow[e[i]]);
  for (int i = remit; i != source; i = g[i]) {
    int x = e[i];
    flow[x] += delta;
    flow[x ^ 1] -= delta;
  }
  ans += delta * dis[remit];
  return 1;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  source = n + n + m;
  remit = source + 1;
  memset(st, -1, sizeof(st));
  ln = 0;
  for (int i = 0; i < m; i++) in_edge(source, (n << 1) + i, 1, 0);
  for (int i = 0; i < n; i++) {
    in_edge(source, n + i, 1, 0);
    in_edge(i, remit, 1, 0);
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) in_edge((n << 1) + i, j, 1, calc(a[j]));
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      if (a[i] == a[j])
        in_edge(n + i, j, 1, 0);
      else
        in_edge(n + i, j, 1, calc(a[j]));
  ans = 0;
  while (spfa())
    ;
  int dn = 0;
  for (int i = 0; i < n; i++) {
    int flag = 0;
    for (int j = st[i]; j != -1; j = nxt[j])
      if (flow[j] < con[j]) {
        int v = aim[j];
        if (v >= (n << 1) && v < source) {
          tag[dn] = 0;
          d[dn++] = i;
          tag[dn] = 1;
          d[dn++] = v - (n << 1);
          num[i] = v - (n << 1);
        } else if (v >= n && v <= (n << 1)) {
          int p = v - n;
          if (a[p] != a[i]) {
            tag[dn] = 0;
            d[dn++] = i;
          }
          tag[dn] = 1;
          d[dn++] = num[p];
          num[i] = num[p];
        }
      }
  }
  printf("%d %d\n", dn, ans);
  for (int i = 0; i < dn; i++)
    if (!tag[i]) {
      printf("%c=%d\n", 'a' + num[d[i]], a[d[i]]);
    } else {
      printf("print(%c)\n", 'a' + d[i]);
    }
  return 0;
}