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;
namespace F {
const int N = 600, M = 400050, inf = ~0u >> 2;
struct edge {
  int t, f, c;
  edge *n, *d;
} eb[M * 2], *ec = eb, *e[N];
int n, s, t, flow, cost;
inline void add_edge(int s, int t, int f, int c) {
  *ec = (edge){t, f, c, e[s], ec + 1};
  e[s] = ec++;
  *ec = (edge){s, 0, -c, e[t], ec - 1};
  e[t] = ec++;
}
inline bool spfa() {
  static int que[M], pre[N], dis[N];
  static edge *pE[N];
  int l(0), r(0), x, y;
  fill(dis, dis + n + 1, inf);
  dis[que[++r] = s] = 0;
  while (l != r)
    for (edge *i = e[x = que[++l]]; i; i = i->n)
      if (i->f && dis[x] + i->c < dis[y = i->t])
        dis[que[++r] = y] = dis[x] + i->c, pre[y] = x, pE[y] = i;
  if (dis[t] > 0) return false;
  int f(inf), c(0);
  for (int i = t; i != s; i = pre[i]) f = min(f, pE[i]->f), c += pE[i]->c;
  for (int i = t; i != s; i = pre[i]) pE[i]->f -= f, pE[i]->d->f += f;
  flow += f;
  cost += f * c;
  return true;
}
inline void solve(int n, int s, int t) {
  F::n = n;
  F::s = s;
  F::t = t;
  while (spfa())
    ;
}
int *idArr;
void dfs(int x, int id) {
  if (x == t) return;
  idArr[(x + 1) / 2] = id;
  for (edge *i = e[x + 1]; i; i = i->n)
    if (i->t > x && i->t != s && !i->f) {
      dfs(i->t, id);
      return;
    }
}
inline void collect(int n, int *id) {
  int cid(0);
  idArr = id;
  for (int i = 1; i <= n; ++i)
    if (!idArr[i]) dfs(i * 2 - 1, ++cid);
}
}  // namespace F
const int N = 255, FF = 16384;
int n, m, arr[N], vID[N];
int genAnswer(bool real = true) {
  static int cval[N];
  int res(0);
  fill(cval, cval + m + 1, -1);
  for (int i = 1; i <= n; ++i) {
    if (cval[vID[i]] != arr[i]) {
      ++res;
      if (real) printf("%c=%d\n", 'a' + vID[i] - 1, arr[i]);
    }
    cval[vID[i]] = arr[i];
    ++res;
    if (real) printf("print(%c)\n", 'a' + vID[i] - 1);
  }
  return res;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%d", arr + i);
  int ss = n * 2 + 1, s = ss + 1, t = s + 1;
  for (int i = 1; i <= n; ++i) {
    F::add_edge(s, (i * 2 - 1), 1, 0);
    F::add_edge((i * 2 - 1), (i * 2), 1, -FF);
    for (int j = i + 1; j <= n; ++j)
      F::add_edge((i * 2), (j * 2 - 1), 1,
                  (arr[i] == arr[j]) ? -__builtin_popcount(arr[j]) : 0);
    F::add_edge((i * 2), t, 1, 0);
  }
  int bres = FF * n;
  for (int i = 1; i <= n; ++i) bres += __builtin_popcount(arr[i]);
  F::add_edge(ss, s, m, 0);
  F::solve(t, ss, t);
  F::collect(n, vID);
  int clines = genAnswer(false);
  printf("%d %d\n", clines, F::cost + bres);
  genAnswer();
  return 0;
}