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;
map<int, int> mp;
int flag[1010], sg[1010], ff[1010];
int N, p, f, s, i, j, x, ss, y, z, t, l, S, T, u, use[1010], pre[1010], ans, m,
    n, tot, xx, a[1010];
int v[10010], ne[10010], head[1010], cost[10010], flo[10010], ffl[10010],
    fro[10010], dis[1010];
queue<int> q;
void add(int x, int y, int c, int f) {
  v[++l] = y;
  ne[l] = head[x];
  head[x] = l;
  cost[l] = c;
  flo[l] = f;
  fro[l] = x;
  v[++l] = x;
  ne[l] = head[y];
  head[y] = l;
  cost[l] = -c;
  flo[l] = 0;
  fro[l] = y;
}
bool spfa() {
  q.push(S);
  memset(dis, 63, sizeof(dis));
  ffl[S] = 1e9;
  dis[S] = 0;
  while (!q.empty()) {
    u = q.front();
    q.pop();
    use[u] = 0;
    for (int i = head[u]; i; i = ne[i])
      if (flo[i] && dis[u] + cost[i] < dis[v[i]]) {
        ffl[v[i]] = min(ffl[u], flo[i]);
        dis[v[i]] = dis[u] + cost[i];
        pre[v[i]] = i;
        if (!use[v[i]]) q.push(v[i]), use[v[i]] = 1;
      }
  }
  return dis[T] < 1e9;
}
void flowback(int x) {
  int t = T;
  while (t != S) {
    flo[pre[t]] -= x;
    flo[pre[t] ^ 1] += x;
    t = fro[pre[t]];
  }
}
void min_cost_flow() {
  while (spfa()) {
    flowback(ffl[T]);
    ans += ffl[T] * dis[T];
  }
}
int main() {
  scanf("%d%d", &n, &m);
  ss = 1000;
  l = 1;
  S = n * 2 + 1;
  T = n * 2 + 2;
  add(S, 1, 0, m);
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    for (t = 0, xx = x; xx; xx >>= 1) t += xx & 1;
    a[i] = x;
    if (mp[x]) add(mp[x] + n, i, (i - mp[x] - 1) * ss, 1);
    mp[x] = i;
    if (i < n)
      add(i + n, i + 1, t, 1), add(i, i + 1, ss, 1e9);
    else
      add(i + n, T, t, 1), add(i, T, ss, 1e9);
    add(i, i + n, 0, 1);
  }
  min_cost_flow();
  ans -= ss * (m - 1) * n;
  for (i = 1; i <= n; i++) {
    for (j = head[i + n]; j; j = ne[j])
      if ((!flo[j]) && (cost[j] == (v[j] - i - 1) * ss))
        flag[i] = 1, sg[v[j]] = i;
    if (!sg[i]) tot++;
    tot++;
  }
  printf("%d %d\n", tot, ans);
  for (i = 1; i <= n; i++) {
    if (!sg[i]) {
      for (j = 0; j < m && use[j]; j++)
        ;
      ff[i] = j;
      use[j] = 1;
      printf("%c=%d\n", j + 'a', a[i]);
    } else
      ff[i] = ff[sg[i]];
    printf("print(%c)\n", ff[i] + 'a');
    if (!flag[i]) use[ff[i]] = 0;
  }
  fclose(stdout);
}