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 = 605;
const int inf = 1995108;
struct side {
  int a, l, c, w;
} e[250005];
int start[Maxn], n, m, S, T, p, tot = 1;
int pre[Maxn], dis[Maxn], q[Maxn * Maxn], a[Maxn], b[Maxn], bl[Maxn];
bool in[Maxn];
inline void add(int x, int y, int z, int w) {
  e[++tot].l = start[x];
  e[tot].a = y;
  e[tot].c = z;
  e[tot].w = w;
  start[x] = tot;
  e[++tot].l = start[y];
  e[tot].a = x;
  e[tot].c = 0;
  e[tot].w = -w;
  start[y] = tot;
}
inline int get(int x) {
  int s = 0;
  for (; x; x >>= 1) s += x & 1;
  return s;
}
void Init() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i), b[i] = a[i];
  S = 2 * n + 1;
  T = 2 * n + 2;
  add(S, T, m, 0);
  for (int i = 1; i <= n; ++i) {
    add(i + n, T, 1, 0);
    add(i, i + n, 1, -inf);
    int p = get(a[i]);
    add(S, i, 1, p);
    for (int j = 1; j <= i - 1; ++j)
      if (a[j] != a[i])
        add(j + n, i, 1, p);
      else
        add(j + n, i, 1, 0);
  }
  S = 0;
  add(S, 2 * n + 1, m, 0);
}
bool spfa() {
  int h, t, x, y;
  for (int i = 1; i <= T; ++i) dis[i] = inf;
  h = 0;
  t = 0;
  q[t = 1] = S;
  in[S] = 1;
  dis[S] = 0;
  while (h != t) {
    x = q[++h];
    for (int i = start[x]; i; i = e[i].l)
      if (e[i].c > 0) {
        y = e[i].a;
        if (dis[y] <= dis[x] + e[i].w) continue;
        dis[y] = dis[x] + e[i].w;
        pre[y] = i;
        if (!in[y]) {
          ++t;
          q[t] = y;
          in[y] = 1;
        }
      }
    in[x] = 0;
  }
  return dis[T] < 0;
}
void Work() {
  int ans = 0;
  while (spfa()) {
    int d = inf;
    for (int t = T; t; t = e[pre[t] ^ 1].a)
      d = ((e[pre[t]].c) < (d) ? (e[pre[t]].c) : (d));
    ans += d * dis[T];
    for (int t = T; t; t = e[pre[t] ^ 1].a)
      e[pre[t]].c -= d, e[pre[t] ^ 1].c += d;
  }
  ans += n * inf;
  int k = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = start[i]; j; j = e[j].l)
      if (e[j].c == 1) {
        int y = e[j].a;
        if (y == 2 * n + 1)
          bl[i] = ++p;
        else {
          y -= n;
          bl[i] = bl[y];
        }
        if (b[y] != a[i])
          ++k;
        else
          a[i] = 0;
        ++k;
      }
  }
  printf("%d %d\n", k, ans);
  for (int i = 1; i <= n; ++i) {
    if (a[i]) printf("%c=%d\n", 96 + bl[i], a[i]);
    printf("print(%c)\n", 96 + bl[i]);
  }
}
int main() {
  Init();
  Work();
  return 0;
}