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 n, m;
int a[600];
struct Action {
  int id, op, x, y;
} out[600];
int tot, var;
struct Edge {
  int u, v, cap, cost, next;
} e[600 * 600];
int et, head[600];
int maxFlow;
bool vis[600];
int que[600 * 600], pre[600], dis[600];
bool C(Action p, Action q) {
  return p.id < q.id || (p.id == q.id && p.op < q.op);
}
int calc(int x) {
  int res = 0;
  while (x > 0) {
    res += x & 1;
    x >>= 1;
  }
  return res;
}
void addEdge(int u, int v, int cap, int cost) {
  e[et].u = u, e[et].v = v, e[et].cap = cap, e[et].cost = cost,
  e[et].next = head[u], head[u] = et++;
  e[et].u = v, e[et].v = u, e[et].cap = 0, e[et].cost = -cost,
  e[et].next = head[v], head[v] = et++;
}
bool spfa(int S, int T, int n) {
  int i, u, v, h = 0, t = 1;
  for (i = 0; i <= n; ++i) {
    pre[i] = -1;
    dis[i] = 1e+8;
    vis[i] = false;
  }
  que[1] = S, dis[S] = 0, vis[S] = true;
  while (h < t) {
    u = que[++h];
    for (i = head[u]; i != -1; i = e[i].next) {
      v = e[i].v;
      if (e[i].cap > 0 && dis[v] > dis[u] + e[i].cost) {
        pre[v] = i;
        dis[v] = dis[u] + e[i].cost;
        if (!vis[v]) {
          vis[v] = true;
          que[++t] = v;
        }
      }
    }
    vis[u] = false;
  }
  return dis[T] == 1e+8 ? false : true;
}
int mcmf(int S, int T, int n) {
  int flow = 0;
  int i, minFlow, minCost = 0;
  while (spfa(S, T, n)) {
    minFlow = 1e+8 + 1;
    for (i = pre[T]; i != -1; i = pre[e[i].u]) {
      minFlow = min(minFlow, e[i].cap);
    }
    flow += minFlow;
    for (i = pre[T]; i != -1; i = pre[e[i].u]) {
      e[i].cap -= minFlow, e[i ^ 1].cap += minFlow;
    }
    minCost += dis[T] * minFlow;
  }
  maxFlow = flow;
  return minCost;
}
void addAction(int id, int op, int x, int y = -1) {
  out[tot].id = id, out[tot].op = op, out[tot].x = x, out[tot].y = y, ++tot;
}
void dfs(int u) {
  int i;
  for (i = head[u]; i != -1; i = e[i].next)
    if (e[i].cap == 0 && e[i].v > n) {
      if (a[u] != a[e[i].v - n]) {
        addAction(e[i].v - n, 0, var, a[e[i].v - n]);
      }
      addAction(e[i].v - n, 1, var);
      dfs(e[i].v - n);
      return;
    }
}
int main() {
  int S, T, V;
  int i, j;
  scanf("%d%d", &n, &m);
  S = 0, T = 2 * n + 2, V = 2 * n + 1;
  et = 0, memset(head, -1, sizeof(head));
  for (i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    addEdge(S, i, 1, 0);
    addEdge(V, n + i, 1, calc(a[i]));
    addEdge(n + i, T, 1, 0);
  }
  addEdge(S, V, m, 0);
  for (i = 1; i < n; ++i)
    for (j = n; j > i; --j) {
      addEdge(i, n + j, 1, a[i] == a[j] ? 0 : calc(a[j]));
    }
  int penal = mcmf(S, T, 2 * n + 3);
  tot = 0, var = 0;
  for (i = head[V]; i != -1; i = e[i].next)
    if (e[i].cap == 0 && e[i].v > n) {
      addAction(e[i].v - n, 0, var, a[e[i].v - n]);
      addAction(e[i].v - n, 1, var);
      dfs(e[i].v - n);
      ++var;
    }
  sort(out, out + tot, C);
  printf("%d %d\n", tot, penal);
  for (i = 0; i < tot; ++i) switch (out[i].op) {
      case 0:
        printf("%c=%d\n", out[i].x + 'a', out[i].y);
        break;
      case 1:
        printf("print(%c)\n", out[i].x + 'a');
        break;
    }
  return 0;
}