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 M = 100100, inf = 200000;
int n, m, cp = 1, T, ans = 0;
int hd[600], ot[M], nt[M], v[M], f[M], a[300];
void add(const int x, const int y, const int z, const int F) {
  ot[++cp] = y, nt[cp] = hd[x], hd[x] = cp, v[cp] = z, f[cp] = F;
  ot[++cp] = x, nt[cp] = hd[y], hd[y] = cp, v[cp] = 0, f[cp] = -F;
}
int Q(const int x) {
  int p = 0;
  for (int i = x; i > 0; ++p, i -= (i & (-i)))
    ;
  return p;
}
int b[1010000], dis[600], pre[600], u[600];
bool spfa() {
  dis[0] = 0;
  for (int i = 1; i <= T; ++i) dis[i] = inf, u[i] = 0;
  int h = 1, t = 1, now;
  b[1] = 0, u[0] = 1;
  for (; h <= t; ++h) {
    now = b[h];
    for (int i = hd[now]; i != 0; i = nt[i])
      if (v[i] > 0 && dis[ot[i]] > dis[now] + f[i]) {
        dis[ot[i]] = dis[now] + f[i];
        pre[ot[i]] = i;
        if (u[ot[i]] == 0) u[ot[i]] = 1, b[++t] = ot[i];
      }
    u[now] = 0;
  }
  if (dis[T] < inf) {
    for (now = T; now != 0; now = ot[pre[now] ^ 1])
      --v[pre[now]], ++v[pre[now] ^ 1];
    ans += dis[T];
    return 1;
  }
  return 0;
}
int c[30], d[600];
void Gans() {
  int A = 0, A1 = n;
  for (int j = 1; j <= n; ++j)
    for (int i = hd[j]; i != 0; i = nt[i])
      if (v[i] > 0 && ot[i] != j + n) {
        if (ot[i] == 0 || a[ot[i] - n] != a[j]) ++A1;
        break;
      }
  cout << A1 << ' ' << ans + n * inf << endl;
  for (int j = 1; j <= n; ++j)
    for (int i = hd[j]; i != 0; i = nt[i])
      if (v[i] > 0 && ot[i] != j + n) {
        if (ot[i] == 0)
          c[++A] = a[j], d[j] = A,
          printf("%c=%d\nprint(%c)\n", 'a' + A - 1, a[j], 'a' + A - 1);
        else {
          d[j] = d[ot[i] - n];
          if (c[d[j]] != a[j])
            c[d[j]] = a[j], printf("%c=%d\n", 'a' + d[j] - 1, a[j]);
          printf("print(%c)\n", 'a' + d[j] - 1);
        }
        break;
      }
}
int main() {
  scanf("%d%d", &n, &m);
  memset(hd, 0, sizeof(hd));
  T = n + n + 1;
  for (int i = 1; i <= n; ++i)
    scanf("%d", &a[i]), add(i, i + n, 1, -inf), add(0, i, 1, Q(a[i])),
        add(i + n, T, 1, 0);
  add(0, T, m, 0);
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j)
      if (a[i] != a[j])
        add(i + n, j, 1, Q(a[j]));
      else
        add(i + n, j, 1, 0);
  for (int i = 1; i <= m; ++i)
    if (!spfa()) break;
  Gans();
  return 0;
}