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;
struct edge {
  int u, v, f, c, next;
};
struct edge e[300010];
int n, k, num, tot, mc, ans, inf = 1e9;
int a[1010], q[10010], head[1010], used[1010], dis[1010], pre[1010];
void add(int u, int v, int f, int c) {
  e[num].u = u;
  e[num].v = v;
  e[num].f = f;
  e[num].c = c;
  e[num].next = head[u];
  head[u] = num;
  num++;
  e[num].u = v;
  e[num].v = u;
  e[num].f = 0;
  e[num].c = -c;
  e[num].next = head[v];
  head[v] = num;
  num++;
}
int calc(int i) {
  int ret = 0;
  while (i != 0) {
    ret += i & 1;
    i /= 2;
  }
  return ret;
}
void change() {
  int j;
  j = pre[2 + n + n + 1];
  while (j != -1) {
    e[j].f--;
    e[j ^ 1].f++;
    j = pre[e[j].u];
  }
}
int spfa() {
  int t, w, i, j;
  for (i = 1; i <= 2 + n + n + 1; i++) dis[i] = inf;
  t = 1;
  w = 1;
  q[t] = 1;
  dis[1] = 0;
  while (t <= w) {
    used[q[t]] = 0;
    j = head[q[t]];
    while (j != -1) {
      if (e[j].f > 0 && dis[q[t]] + e[j].c < dis[e[j].v]) {
        dis[e[j].v] = dis[q[t]] + e[j].c;
        pre[e[j].v] = j;
        if (used[e[j].v] == 0) {
          used[e[j].v] = 1;
          w++;
          q[w] = e[j].v;
        }
      }
      j = e[j].next;
    }
    t++;
  }
  return dis[2 + n + n + 1] != inf ? 1 : 0;
}
int main() {
  int i, j;
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(head, -1, sizeof(head));
  add(1, 2, k, 0);
  for (i = 1; i <= n; i++) {
    add(1, 2 + i, 1, 0);
    add(2, 2 + n + i, 1, calc(a[i]));
    add(2 + n + i, 2 + n + n + 1, 1, 0);
    for (j = i + 1; j <= n; j++)
      add(2 + i, 2 + n + j, 1, a[j] != a[i] ? calc(a[j]) : 0);
  }
  pre[1] = -1;
  while (spfa()) {
    mc += dis[2 + n + n + 1];
    change();
  }
  memset(pre, 0, sizeof(pre));
  for (i = 0; i < num; i += 2)
    if (e[i].u > 2 && e[i].u <= 2 + n && e[i].v > 2 + n &&
        e[i].v <= 2 + n + n && e[i].f == 0) {
      pre[e[i].v - 2 - n] = e[i].u - 2;
    }
  tot = 0;
  for (i = 1; i <= n; i++)
    if (pre[i] == 0) {
      tot++;
      used[i] = tot;
    } else
      used[i] = used[pre[i]];
  for (i = 1; i <= n; i++) {
    if (a[i] != a[pre[i]]) ans++;
    ans++;
  }
  printf("%d %d\n", ans, mc);
  for (i = 1; i <= n; i++) {
    if (a[i] != a[pre[i]]) printf("%c=%d\n", used[i] + 96, a[i]);
    printf("print(%c)\n", used[i] + 96);
  }
  return 0;
}