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 lst[100005], to[200005], pre[200005], cap[200005], cost[200005],
    rev[200005], tot;
int dis[100005], prev_e[100005], prev_v[100005], que[100005];
bool in_que[100005];
inline void add_edge(int u, int v, int _cap, int _cost) {
  to[tot] = v;
  pre[tot] = lst[u];
  cap[tot] = _cap;
  cost[tot] = _cost;
  rev[tot] = tot + 1;
  lst[u] = tot++;
  to[tot] = u;
  pre[tot] = lst[v];
  cap[tot] = 0;
  cost[tot] = -_cost;
  rev[tot] = tot - 1;
  lst[v] = tot++;
}
inline int min_cost_max_flow(int s, int t) {
  int res = 0;
  while (true) {
    int he = 0, ta = 1;
    memset(dis, 0x3f, sizeof(dis));
    memset(in_que, false, sizeof(in_que));
    que[0] = s;
    in_que[s] = true;
    dis[s] = 0;
    while (he < ta) {
      int u = que[he++];
      in_que[u] = false;
      for (int i = lst[u]; ~i; i = pre[i]) {
        if (cap[i] && dis[to[i]] > dis[u] + cost[i]) {
          dis[to[i]] = dis[u] + cost[i];
          prev_e[to[i]] = i;
          prev_v[to[i]] = u;
          if (!in_que[to[i]]) {
            in_que[to[i]] = true;
            que[ta++] = to[i];
          }
        }
      }
    }
    if (dis[t] == 0x3f3f3f3f) break;
    int u = t, mx = 1e9;
    while (u != s) {
      mx = min(mx, cap[prev_e[u]]);
      u = prev_v[u];
    }
    if (!mx) break;
    u = t;
    res += mx * dis[t];
    while (u != s) {
      cap[prev_e[u]] -= mx;
      cap[rev[prev_e[u]]] += mx;
      u = prev_v[u];
    }
  }
  return res;
}
int arr[255], idx[255], val[35];
char ans[505][505];
inline int cnt(int x) {
  int res = 0;
  while (x) {
    x &= x - 1;
    res++;
  }
  return res;
}
inline int calc(int x, int y) {
  if (x == y) return 0;
  return cnt(y);
}
int main() {
  memset(lst, -1, sizeof(lst));
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", arr + i);
  for (int i = 0; i < n; i++) {
    add_edge(i + n + 1, n + n + 1, 1, 0);
    add_edge(1, i + n + 1, 1, cnt(arr[i]));
    for (int j = i + 1; j < n; j++)
      add_edge(i + 2, j + n + 1, 1, calc(arr[i], arr[j]));
  }
  add_edge(0, 1, m, 0);
  for (int i = 1; i < n; i++) add_edge(0, i + 1, 1, 0);
  int res = min_cost_max_flow(0, n + n + 1), cur = 0, ans_cnt = 0;
  for (int i = 0; i < n; i++) {
    for (int j = lst[i + n + 1]; ~j; j = pre[j]) {
      if (cap[j] && to[j] < i + n + 1) {
        idx[i] = to[j] == 1 ? cur++ : idx[to[j] - 2];
        break;
      }
    }
    if (val[idx[i]] != arr[i])
      sprintf(ans[ans_cnt++], "%c=%d", idx[i] + 'a', arr[i]);
    val[idx[i]] = arr[i];
    sprintf(ans[ans_cnt++], "print(%c)", idx[i] + 'a');
  }
  printf("%d %d\n", ans_cnt, res);
  for (int i = 0; i < ans_cnt; i++) puts(ans[i]);
  return 0;
}