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 maxn = 510;
const int maxm = maxn * maxn << 1;
const int INF = 0x3f3f3f3f;
int n, m, s, t, en, ans, cost[maxn], z[maxn], value[maxn], pre[maxn],
    dist[maxn], q[maxn], f[maxn];
bool use[maxn];
struct edge {
  int e, f, d;
  bool dir;
  edge *next, *op;
} * v[maxn], ed[maxm], *fe[maxn];
void add_edge(int s, int e, int f, int d) {
  en++;
  ed[en].next = v[s];
  v[s] = ed + en;
  v[s]->e = e;
  v[s]->f = f;
  v[s]->d = d;
  v[s]->dir = true;
  en++;
  ed[en].next = v[e];
  v[e] = ed + en;
  v[e]->e = s;
  v[e]->f = 0;
  v[e]->d = -d;
  v[e]->dir = false;
  v[s]->op = v[e];
  v[e]->op = v[s];
}
bool spfa() {
  memset(dist, 0x3f, sizeof(dist));
  dist[s] = 0;
  int front = 1, tail = 2;
  q[1] = s;
  for (; front != tail;) {
    int now = q[front++];
    if (front == maxn) front = 0;
    use[now] = false;
    for (edge *e = v[now]; e; e = e->next)
      if (e->f && dist[e->e] > dist[now] + e->d) {
        dist[e->e] = dist[now] + e->d;
        f[e->e] = now;
        fe[e->e] = e;
        if (!use[e->e]) {
          use[e->e] = true;
          q[tail++] = e->e;
          if (tail == maxn) tail = 0;
        }
      }
  }
  return dist[t] != INF;
}
void agument() {
  int delta = INF;
  for (int p = t; p != s; p = f[p]) delta = min(delta, fe[p]->f);
  for (int p = t; p != s; p = f[p]) {
    fe[p]->f -= delta;
    fe[p]->op->f += delta;
  }
  ans += dist[t] * delta;
}
void flow() {
  while (spfa()) agument();
}
int main() {
  scanf("%d%d", &n, &m);
  s = n << 1 | 1;
  t = s + 1;
  add_edge(s, 0, m, 0);
  for (int a = 1; a <= n; a++) {
    scanf("%d", &z[a]);
    int v = z[a];
    while (v) cost[a] += v & 1, v >>= 1;
    add_edge(s, a, 1, 0);
    add_edge(0, n + a, 1, cost[a]);
    add_edge(n + a, t, 1, 0);
    for (int b = 1; b < a; b++)
      if (z[a] != z[b])
        add_edge(b, a + n, 1, cost[a]);
      else
        add_edge(b, a + n, 1, 0);
  }
  flow();
  int num = 0;
  for (edge *e = v[0]; e; e = e->next)
    if (e->dir && !e->f) value[e->e - n] = ++num;
  for (int a = 1; a <= n; a++)
    for (edge *e = v[a]; e; e = e->next)
      if (e->dir && !e->f) pre[e->e - n] = a;
  for (int a = 1; a <= n; a++) num += 1 + (pre[a] && z[a] != z[pre[a]]);
  printf("%d %d\n", num, ans);
  for (int a = 1; a <= n; a++) {
    if (pre[a]) value[a] = value[pre[a]];
    if (z[a] != z[pre[a]]) printf("%c=%d\n", 'a' + value[a] - 1, z[a]);
    printf("print(%c)\n", 'a' + value[a] - 1);
  }
  return 0;
}