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 MAX_N = 555, MAX_M = 500 * 500 * 4;
int g[MAX_M], nxt[MAX_M], cost[MAX_M], flow[MAX_M], nm, c[MAX_N];
int iq[MAX_N], d[MAX_N], pk[MAX_N], pre[MAX_N];
int S, T, n, m, ans;
int col[MAX_N], nw[MAX_N], a[MAX_N];
queue<int> q;
int calc(int x) {
  int tot = 0;
  for (; x; x -= x & (-x)) ++tot;
  return tot;
}
void addedge(int x, int y, int w, int ct) {
  g[nm] = y;
  nxt[nm] = c[x];
  c[x] = nm;
  cost[nm] = ct;
  flow[nm] = w;
  nm++;
}
void add(int x, int y, int w, int ct) {
  addedge(x, y, w, ct);
  addedge(y, x, 0, -ct);
}
bool spfa() {
  for (int i = 1; i <= T; ++i) d[i] = 1000000000;
  memset(iq, 0, sizeof iq);
  q.push(S);
  d[S] = 0;
  while (!q.empty()) {
    int i = q.front();
    q.pop();
    iq[i] = 0;
    for (int k = c[i]; ~k; k = nxt[k]) {
      int j = g[k];
      if (d[j] > d[i] + cost[k] && flow[k]) {
        d[j] = d[i] + cost[k];
        pk[j] = k;
        pre[j] = i;
        if (!iq[j]) {
          iq[j] = 1;
          q.push(j);
        }
      }
    }
  }
  return d[T] != 1000000000;
}
void aug() {
  int Fl = 1000000000;
  for (int i = T; i != S; i = pre[i]) Fl = min(Fl, flow[pk[i]]);
  ans += Fl * d[T];
  for (int i = T; i != S; i = pre[i]) {
    flow[pk[i]] -= Fl;
    flow[pk[i] ^ 1] += Fl;
  }
}
void output() {
  for (int i = n + m + 1; i <= S - 1; ++i) {
    for (int k = c[i]; ~k; k = nxt[k]) {
      int j = g[k];
      if (flow[k]) {
        if (j <= m)
          col[i - n - m] = j;
        else
          col[i - n - m] = col[j - m];
      }
    }
  }
  int ls = n;
  memset(nw, 0, sizeof nw);
  for (int i = 1; i <= n; ++i)
    if (nw[col[i]] != a[i]) {
      nw[col[i]] = a[i];
      ++ls;
    }
  memset(nw, 0, sizeof nw);
  printf("%d %d\n", ls, ans);
  for (int i = 1; i <= n; ++i) {
    if (nw[col[i]] != a[i]) {
      nw[col[i]] = a[i];
      printf("%c=%d\n", col[i] + 'a' - 1, a[i]);
    }
    printf("print(%c)\n", col[i] + 'a' - 1);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  S = m + n + n + 1;
  T = S + 1;
  memset(c, -1, sizeof c);
  for (int i = 1; i <= m; ++i)
    for (int j = 1; j <= n; ++j) add(i, m + n + j, 1, calc(a[j]));
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j)
      add(m + i, m + n + j, 1, a[i] == a[j] ? 0 : calc(a[j]));
  for (int i = 1; i <= n + m; ++i) add(S, i, 1, 0);
  for (int i = n + m + 1; i <= S - 1; ++i) add(i, T, 1, 0);
  while (spfa()) aug();
  output();
}