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 MAXN = 255;
int n, m;
int a[MAXN];
struct Edge {
  int num, next, cap, cost, rev;
} e[MAXN * MAXN * 2];
int en = 0, start[MAXN * 2];
inline void Add_edge(int p, int q, int r, int c) {
  en++;
  e[en].num = q;
  e[en].next = start[p];
  start[p] = en;
  e[en].cap = r;
  e[en].cost = c;
  e[en].rev = en + 1;
  en++;
  e[en].num = p;
  e[en].next = start[q];
  start[q] = en;
  e[en].cap = 0;
  e[en].cost = -c;
  e[en].rev = en - 1;
}
inline int B(int x) {
  int s = 0;
  while (x) {
    s += (x & 1);
    x >>= 1;
  }
  return s;
}
int ans = 0;
int dis[MAXN * 2], pre[MAXN * 2];
int q[MAXN * 2 + 5], l, r;
bool u[MAXN * 2];
void spfa() {
  memset(dis, 20, sizeof(dis));
  memset(pre, -1, sizeof(pre));
  l = 0, r = 1;
  q[l] = 1;
  dis[1] = 0;
  while (l != r) {
    int p = q[l];
    l = (l + 1) % (MAXN * 2);
    u[p] = false;
    for (int i = start[p]; i != 0; i = e[i].next)
      if (e[i].cap > 0 && dis[e[i].num] > dis[p] + e[i].cost) {
        dis[e[i].num] = dis[p] + e[i].cost;
        pre[e[i].num] = i;
        if (!u[e[i].num]) {
          u[e[i].num] = true;
          q[r] = e[i].num;
          r = (r + 1) % (MAXN * 2);
        }
      }
  }
}
void mcmf() {
  while (true) {
    spfa();
    if (pre[n] == -1) break;
    int i = n, aug = 100000;
    while (i != 1) {
      if (e[pre[i]].cap < aug) aug = e[pre[i]].cap;
      i = e[e[pre[i]].rev].num;
    }
    i = n;
    while (i != 1) {
      ans += e[pre[i]].cost * aug;
      e[pre[i]].cap -= aug;
      e[e[pre[i]].rev].cap += aug;
      i = e[e[pre[i]].rev].num;
    }
  }
}
char re[MAXN];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  Add_edge(1, 2, m, 0);
  for (int i = 1; i <= n; i++) Add_edge(1, i + 2, 1, 0);
  for (int i = 1; i <= n; i++) Add_edge(2, i + n + 2, 1, B(a[i]));
  for (int i = 1; i <= n; i++) Add_edge(i + n + 2, n + n + 3, 1, 0);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (a[i] == a[j])
        Add_edge(i + 2, j + n + 2, 1, 0);
      else
        Add_edge(i + 2, j + n + 2, 1, B(a[j]));
  n = n + n + 3;
  mcmf();
  int s = 0;
  n = (n - 3) / 2;
  for (int i = 1; i <= en; i += 2)
    if (e[i].cost != 0) s += e[e[i].rev].cap;
  printf("%d %d\n", n + s, ans);
  int now = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = start[i + n + 2]; j != 0; j = e[j].next)
      if (e[j].cap != 0) {
        if (e[j].num == 2) {
          char tmp = 'a' + (now++);
          printf("%c=%d\n", tmp, a[i]);
          re[i] = tmp;
        } else {
          re[i] = re[e[j].num - 2];
          if (e[j].cost != 0) printf("%c=%d\n", re[i], a[i]);
        }
        printf("print(%c)\n", re[i]);
      }
  }
  return 0;
}