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;
const int inf = 1 << 30;
int n, m, a[255], p[255];
int h[255 << 1], ent;
int S, T, SuS, SuT, flow, cost;
int in[255 << 1], q[(255 << 1) * 20], dis[255 << 1], frt[255 << 1], qt, dt, bt;
int count(int x) {
  int s = 0;
  while (x) s++, x -= x & -x;
  return s;
}
struct edge {
  int v, n, f, c;
  edge(int y = 0, int t = 0, int z = 0, int w = 0) : v(y), n(t), f(z), c(w) {}
} e[((255 * 255) << 1)];
void link(int x, int y, int f, int c) {
  e[++ent] = edge(y, h[x], f, c), h[x] = ent;
}
void flink(int x, int y, int f, int c) { link(x, y, f, c), link(y, x, 0, -c); }
bool SPFA() {
  for (int i = 1; i <= SuT; i++) in[i] = 0, dis[i] = inf;
  in[SuS] = 1, dis[SuS] = 0, q[qt = 1] = SuS;
  for (int i = 1, o; i <= qt; i++) {
    o = q[i];
    for (int x = h[o], y; y = e[x].v, x; x = e[x].n)
      if (e[x].f && dis[o] + e[x].c < dis[y]) {
        dis[y] = dis[o] + e[x].c, frt[y] = x;
        if (!in[y]) in[y] = 1, q[++qt] = y;
      }
    in[o] = 0;
  }
  if (dis[SuT] == inf) return 0;
  int nf = inf;
  for (int o = SuT, x; x = frt[o], o != SuS; o = e[x ^ 1].v)
    nf = min(e[x].f, nf);
  for (int o = SuT, x; x = frt[o], o != SuS; o = e[x ^ 1].v)
    e[x].f -= nf, e[x ^ 1].f += nf;
  cost += nf * dis[SuT];
  flow += nf;
  return 1;
}
struct opt {
  int t, x, y;
  opt() {}
  opt(int a, int b, int c) : t(a), x(b), y(c) {}
  opt(int a, int b) : t(a), x(b) {}
  void print() {
    if (t == 1)
      printf("%c=%d\n", 'a' + x - 1, y);
    else
      printf("print(%c)\n", 'a' + x - 1);
  }
} d[255 << 1];
void work() {
  while (SPFA())
    ;
  for (int i = 1; i <= n; i++) {
    int o = (((i) << 1) - 1);
    for (int x = h[o], y; y = e[x].v, x; x = e[x].n)
      if (e[x].f && y != ((i) << 1) && y != SuS) {
        if (y != S) {
          int t = y >> 1;
          if (a[t] != a[i]) d[++dt] = opt(1, p[t], a[i]);
          p[i] = p[t];
        } else {
          bt++;
          d[++dt] = opt(1, bt, a[i]);
          p[i] = bt;
        }
        d[++dt] = opt(2, p[i]);
      }
  }
  printf("%d %d\n", dt, cost);
  for (int i = 1; i <= dt; i++) d[i].print();
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  S = n * 2 + 1, T = n * 2 + 2, SuS = n * 2 + 3, SuT = n * 2 + 4;
  ent = 1;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      flink(((i) << 1), (((j) << 1) - 1), 1, a[i] == a[j] ? 0 : count(a[j]));
      if (a[i] == a[j]) break;
    }
  for (int i = 1; i <= n; i++) flink(S, (((i) << 1) - 1), 1, count(a[i]));
  for (int i = 1; i <= n; i++) flink(((i) << 1), T, 1, 0);
  for (int i = 1; i <= n; i++)
    flink((((i) << 1) - 1), SuT, 1, 0), flink(SuS, ((i) << 1), 1, 0);
  flink(T, S, m, 0);
  work();
  return 0;
}