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 n, cost[1510][1510], s[2][1510], r, d[2][1510], from[2][1510], add[2][1510],
    v[2][1510];
bool augment() {
  int i, b_x, b_y, x, y;
  for (y = 1; y <= n; y++) {
    d[0][y] = s[0][y] ? 1000000000 : 0;
    d[1][y] = 1000000000;
    v[0][y] = v[1][y] = false;
  }
  for (i = 0; i < 2 * n; i++) {
    b_y = 0;
    for (x = 0; x < 2; x++)
      for (y = 1; y <= n; y++)
        if (!v[x][y] && d[x][y] < 1000000000 &&
            (!b_y || d[x][y] < d[b_x][b_y])) {
          b_x = x;
          b_y = y;
        }
    v[b_x][b_y] = true;
    if (b_x == 1) {
      y = s[1][b_y];
      if (d[1][b_y] - cost[y][b_y] + add[1][b_y] - add[0][y] < d[0][y]) {
        d[0][y] = d[1][b_y] - cost[y][b_y] + add[1][b_y] - add[0][y];
        from[0][y] = b_y;
      }
    } else
      for (y = 1; y <= n; y++)
        if (s[0][b_y] != y &&
            d[0][b_y] + cost[b_y][y] + add[0][b_y] - add[1][y] < d[1][y]) {
          d[1][y] = d[0][b_y] + cost[b_y][y] + add[0][b_y] - add[1][y];
          from[1][y] = b_y;
        }
  }
  b_y = 0;
  for (y = 1; y <= n; y++)
    if (!s[1][y] && (!b_y || d[1][y] < d[1][b_y])) b_y = y;
  if (!b_y || d[1][b_y] == 1000000000) return false;
  for (x = 0; x < 2; x++)
    for (y = 1; y <= n; y++) add[x][y] += d[x][y];
  r += add[1][b_y];
  while (b_y) {
    y = from[1][b_y];
    s[0][y] = b_y;
    s[1][b_y] = y;
    b_y = from[0][y];
  }
  return true;
}
int matching() {
  r = 0;
  for (int i = 1; i <= n; i++) augment();
  return r;
}
int k, m, a[1510];
int main() {
  scanf("%d %d", &k, &m);
  for (int i = 1; i <= k; i++) scanf("%d", &a[i]);
  n = k + m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) cost[i][j] = 1000000000;
  for (int i = 1; i <= k; i++)
    for (int j = i + 1; j <= k; j++)
      cost[i][j] = a[i] == a[j] ? 0 : __builtin_popcount(a[j]);
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= k; j++) cost[k + i][j] = __builtin_popcount(a[j]);
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= n; j++) cost[j][k + i] = 0;
  int c = matching(), nr[1510] = {};
  vector<string> ans;
  for (int i = 1; i <= k; i++) {
    int tmp = s[1][i];
    if (tmp < i) {
      if (a[tmp] != a[i]) {
        ostringstream z;
        z << string(1, 'a' + nr[tmp] - 1) << "=" << a[i];
        ans.push_back(z.str());
      }
      nr[i] = nr[tmp];
    } else {
      nr[i] = tmp - k;
      ostringstream z;
      z << string(1, 'a' + nr[i] - 1) << "=" << a[i];
      ans.push_back(z.str());
    }
    ans.push_back("print(" + string(1, 'a' + nr[i] - 1) + ")");
  }
  printf("%d %d\n", (int)ans.size(), c);
  for (int i = 0; i < ans.size(); i++) puts(ans[i].c_str());
  return 0;
}