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 mn = 601, inf = 1 << 30;
int n, m, s, t, s1, ans, l;
int f[mn][mn], c[mn][mn], a[mn], b[mn], u[mn], pre[mn], dis[mn];
int q[mn + 5];
bool vis[mn];
int v[mn];
vector<int> e[mn];
void add(int x, int y, int u, int v) {
  f[x][y] = u, c[x][y] = v, c[y][x] = -v;
  e[x].push_back(y), e[y].push_back(x);
}
int spfa() {
  fill(dis, dis + t + 1, inf);
  fill(vis, vis + t + 1, 0);
  fill(pre, pre + t + 1, 0);
  int i, j, p, r = 0, h = 1;
  dis[s] = 0, q[r] = s, vis[s] = 1;
  while (r != h) {
    i = q[r];
    for (p = 0; p < e[i].size(); ++p) {
      j = e[i][p];
      if (!f[i][j]) continue;
      if (dis[i] + c[i][j] < dis[j]) {
        dis[j] = dis[i] + c[i][j], pre[j] = i;
        if (!vis[j]) q[h] = j, h = (h + 1) % mn, vis[j] = 1;
      }
    }
    vis[i] = 0;
    r = (r + 1) % mn;
    ;
  }
  return dis[t];
}
void repair() {
  for (int i = t, j = pre[i]; i != s; i = j, j = pre[i]) --f[j][i], ++f[i][j];
}
int main() {
  scanf("%d%d", &n, &m);
  int i, j, k, p;
  for (i = 1; i <= n; ++i) scanf("%d", a + i);
  for (i = 1; i <= n; ++i)
    for (k = a[i]; k; k /= 2) b[i] += k & 1;
  s1 = n + n + 1, s = s1 + 1, t = s + 1;
  add(s, s1, m, 0);
  for (i = 1; i <= n; ++i)
    add(s1, i, 1, b[i]), add(i + n, t, 1, 0), add(i, i + n, 1, -10000);
  for (i = 1; i <= n; ++i)
    for (j = i + 1; j <= n; ++j) add(i + n, j, 1, (a[i] != a[j]) * b[j]);
  ans = n * 10000, l = n;
  while (spfa() < 0) ans += dis[t], repair();
  j = 0;
  for (i = 1; i <= n; ++i)
    for (p = 0; p < e[i].size(); ++p) {
      if ((k = e[i][p]) <= n) continue;
      ;
      if (!f[k][i]) {
        if (k == s1)
          u[i] = ++j;
        else
          u[i] = u[k - n];
        if (k == s1 || a[i] != a[k - n]) ++l;
        break;
      }
    }
  printf("%d %d\n", l, ans);
  for (i = 1; i <= n; ++i) {
    if (v[u[i]] != a[i]) printf("%c=%d\n", u[i] + 96, v[u[i]] = a[i]);
    printf("print(%c)\n", u[i] + 96);
  }
  return 0;
}