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;
struct Answ {
  int t, b, c;
} Q[300100];
int j, n, k, i, s, t, cnt, ed = 1, U[300100], C[300100], V[300100], W[300100],
                           nxt[300100], p[300100];
int vis[300100], d[300100], la[300100], q[300100], pre[300100], A[300100],
    B[300100], z[300100];
void Add(int u, int v, int c, int w) {
  V[++ed] = v, U[ed] = u, C[ed] = c, W[ed] = w, nxt[ed] = p[u], p[u] = ed;
  V[++ed] = u, U[ed] = v, C[ed] = 0, W[ed] = -w, nxt[ed] = p[v], p[v] = ed;
}
bool Spfa(int s, int t, int cnt) {
  int i, u, v, l = 0, r = 0;
  for (i = 0; i <= cnt; i++) d[i] = 999999999, vis[i] = false, la[i] = -1;
  vis[s] = true, d[s] = 0, q[++r] = s;
  while (l < r) {
    u = q[++l];
    vis[u] = false;
    for (i = p[u]; i != -1; i = nxt[i]) {
      v = V[i];
      if (C[i] && d[v] > d[u] + W[i]) {
        d[v] = d[u] + W[i], la[v] = i;
        if (!vis[v]) q[++r] = v, vis[v] = 1;
      }
    }
  }
  if (d[t] == 999999999) return false;
  return true;
}
int Mcmf() {
  int mc = 0, mn, i;
  while (Spfa(s, t, cnt)) {
    mn = 999999999;
    for (i = la[t]; i != -1; i = la[V[i ^ 1]]) mn = min(mn, C[i]);
    for (i = la[t]; i != -1; i = la[V[i ^ 1]]) C[i] -= mn, C[i ^ 1] += mn;
    mc += d[t] * mn;
  }
  return mc;
}
int main() {
  memset(p, -1, sizeof(p));
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d", &z[i]);
    for (int x = z[i]; x; x >>= 1) A[i] += x & 1;
  }
  s = 0, t = 2 * n + 2, cnt = 2 * n + 3;
  Add(s, t - 1, k, 0);
  for (i = 1; i <= n; i++) {
    Add(s, i, 1, 0), Add(i + n, t, 1, 0);
    Add(t - 1, i + n, 1, A[i]);
    for (j = i + 1; j <= n; j++) Add(i, j + n, 1, z[i] == z[j] ? 0 : A[j]);
  }
  int ans = Mcmf(), cz = 0, us = 0;
  for (i = 0; i <= t; i++)
    for (j = p[i]; j != -1; j = nxt[j])
      if (!(j & 1) && !C[j]) pre[V[j]] = i;
  for (i = 1; i <= n; i++) {
    j = pre[i + n];
    B[i] = (j == t - 1) ? ++us : B[j];
    if (j == n + 1 || z[j] != z[i]) Q[++cz] = (Answ){1, B[i], z[i]};
    Q[++cz] = (Answ){0, B[i]};
  }
  printf("%d %d\n", cz, ans);
  for (i = 1; i <= cz; i++)
    if (Q[i].t == 0)
      printf("print(%c)\n", Q[i].b + 'a' - 1);
    else
      printf("%c=%d\n", Q[i].b + 'a' - 1, Q[i].c);
  return 0;
}