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 KM(int m, int n, int mat[][310], int *match1, int *match2) {
  int s[310], t[310], l1[310], l2[310];
  int p, q, i, j, k, ret = 0;
  for (i = 0; i < m; i++) {
    l1[i] = -0x3f3f3f3f;
    for (j = 0; j < n; j++) l1[i] = mat[i][j] > l1[i] ? mat[i][j] : l1[i];
    if (l1[i] == -0x3f3f3f3f) return -1;
  }
  for (i = 0; i < n; i++) l2[i] = 0;
  memset(match1, -1, sizeof(int) * 310);
  memset(match2, -1, sizeof(int) * 310);
  for (i = 0; i < m; i++) {
    memset(t, -1, sizeof(int) * 310);
    p = 0;
    q = 0;
    for (s[0] = i; p <= q && match1[i] < 0; p++) {
      for (k = s[p], j = 0; j < n && match1[i] < 0; j++) {
        if (l1[k] + l2[j] == mat[k][j] && t[j] < 0) {
          s[++q] = match2[j];
          t[j] = k;
          if (s[q] < 0) {
            for (p = j; p >= 0; j = p) {
              match2[j] = k = t[j];
              p = match1[k];
              match1[k] = j;
            }
          }
        }
      }
    }
    if (match1[i] < 0) {
      i--;
      p = 0x3f3f3f3f;
      for (k = 0; k <= q; k++) {
        for (j = 0; j < n; j++) {
          if (t[j] < 0 && l1[s[k]] + l2[j] - mat[s[k]][j] < p)
            p = l1[s[k]] + l2[j] - mat[s[k]][j];
        }
      }
      for (j = 0; j < n; j++) l2[j] += t[j] < 0 ? 0 : p;
      for (k = 0; k <= q; k++) l1[s[k]] -= p;
    }
  }
  for (i = 0; i < m; i++) ret += mat[i][match1[i]];
  return ret;
}
int mat[310][310], match1[310], match2[310];
int cost[310], num[310], pre[310];
int main() {
  int n, m, i, j;
  scanf("%d%d", &n, &m);
  memset(cost, 0, sizeof(cost));
  for (i = 0; i < n; ++i) {
    scanf("%d", num + i);
    int x = num[i];
    while (x) cost[i]++, x -= x & -x;
  }
  memset(mat, -0x3f, sizeof(mat));
  for (i = 0; i < n; ++i)
    for (j = 0; j < m; ++j) mat[i][j] = -cost[i];
  for (i = 1; i < n; ++i)
    for (j = 0; j < i; ++j) {
      if (num[i] == num[j])
        mat[i][j + m] = 0;
      else
        mat[i][j + m] = -cost[i];
    }
  int allcost = -KM(n, n + m, mat, match1, match2);
  int line = n;
  for (i = 0; i < n; ++i)
    if (match1[i] < m || num[match1[i] - m] != num[i]) line++;
  printf("%d %d\n", line, allcost);
  for (i = 0; i < n; ++i) {
    if (match1[i] < m) {
      printf("%c=%d\n", 'a' + match1[i], num[i]);
      printf("print(%c)\n", 'a' + match1[i]);
      pre[i] = match1[i];
    } else {
      pre[i] = pre[match1[i] - m];
      if (num[i] != num[match1[i] - m]) {
        printf("%c=%d\n", 'a' + pre[i], num[i]);
        printf("print(%c)\n", 'a' + pre[i]);
      } else
        printf("print(%c)\n", 'a' + pre[i]);
    }
  }
}