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;
int last[605];
int pre[200005];
int e[200005];
int f[200005];
int w[200005];
int d[605];
int r[605];
int a[605];
int v[605];
int p[605];
int c, k, m, src, dest, ans;
int cost(int x) {
  int src = 0;
  while (x) {
    ++src;
    x -= (x & (-x));
  }
  return src;
}
void add(int x, int y, int z, int d) {
  e[++m] = y, f[m] = z, w[m] = d, pre[m] = last[x], last[x] = m;
  e[++m] = x, f[m] = 0, w[m] = -d, pre[m] = last[y], last[y] = m;
}
bool spfa() {
  int i, x, y;
  memset(d, 0x3f, sizeof(d));
  queue<int> q;
  q.push(src);
  d[src] = 0;
  v[src] = 1;
  while (q.size()) {
    x = q.front();
    q.pop();
    v[x] = 0;
    for (i = last[x]; i; i = pre[i])
      if (f[i] && d[y = e[i]] > d[x] + w[i]) {
        d[y] = d[x] + w[i];
        if (!v[y]) q.push(y), v[y] = 1;
        r[y] = i;
      }
  }
  if (d[dest] == 0x3f3f3f3f) return 0;
  return 1;
}
void update() {
  int x;
  for (x = dest; x != src; x = e[r[x] ^ 1]) {
    f[r[x]]--;
    f[r[x] ^ 1]++;
  }
  ans += d[dest];
}
int main() {
  int i, j, cnt = 0;
  scanf("%d%d", &c, &k);
  for (i = 1; i <= c; ++i) scanf("%d", &a[i]);
  src = c * 2 + 1, dest = src + 1, m = 1;
  add(src, 0, k, 0);
  for (i = 1; i <= c; ++i)
    add(0, c + i, 1, cost(a[i])), add(src, i, 1, 0), add(c + i, dest, 1, 0);
  for (i = 1; i < c; ++i)
    for (j = i + 1; j <= c; ++j)
      if (a[i] == a[j])
        add(i, c + j, 1, 0);
      else
        add(i, c + j, 1, cost(a[j]));
  while (spfa()) update();
  memset(v, 0, sizeof(v));
  for (i = last[0]; i != 0; i = pre[i])
    if (!(i & 1) && !f[i]) v[e[i] - c] = ++cnt;
  for (i = 1; i <= c; ++i)
    for (j = last[i]; j != 0; j = pre[j])
      if (!(j & 1) && !f[j]) p[e[j] - c] = i;
  for (i = 1; i <= c; ++i)
    if (p[i] && a[i] != a[p[i]])
      cnt += 2;
    else
      ++cnt;
  printf("%d %d\n", cnt, ans);
  for (i = 1; i <= c; ++i) {
    if (p[i]) v[i] = v[p[i]];
    if (a[i] != a[p[i]]) printf("%c=%d\n", 'a' + v[i] - 1, a[i]);
    printf("print(%c)\n", 'a' + v[i] - 1);
  }
  return 0;
}