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;
char getc() {
  static char *S, *T, buf[65536];
  if (S == T) {
    T = (S = buf) + fread(buf, 1, 65536, stdin);
    if (S == T) return EOF;
  }
  return *S++;
}
int read() {
  static char ch;
  static int D, f;
  while (!isdigit(ch = getc()) && ch != '-')
    ;
  if (ch == '-')
    ch = getc(), f = 1;
  else
    f = 0;
  for (D = ch - '0'; isdigit(ch = getc());) D = D * 10 + ch - '0';
  return f ? D : -D;
}
int n, m;
int h[505], tp = 1;
struct edge {
  int from, to, next, flow, cost;
} e[2000005];
void ae(int u, int v, int w, int c) {
  e[++tp].from = u;
  e[tp].to = v;
  e[tp].next = h[u];
  e[tp].flow = w;
  e[tp].cost = c;
  h[u] = tp;
}
void add(int u, int v, int w, int c) {
  ae(u, v, w, c);
  ae(v, u, 0, -c);
}
int a[505], S, T;
int calc(int b) {
  int ret = 0;
  for (int i = 0; i < 30; i++) ret += (b >> i & 1);
  return ret;
}
int dis[505], fr[505], fa[505], from[505], rk[505];
bool vis[505];
queue<int> q;
bool spfa() {
  memset(dis, 0x3f, sizeof(dis));
  dis[S] = 0;
  q.push(S);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    vis[u] = 0;
    for (int v, i = h[u]; i; i = e[i].next)
      if (e[i].flow && dis[v = e[i].to] > dis[u] + e[i].cost) {
        fr[v] = i;
        fa[v] = u;
        dis[v] = dis[u] + e[i].cost;
        if (!vis[v]) {
          vis[v] = 1;
          q.push(v);
        }
      }
  }
  return dis[T] < 0;
}
int dinic() {
  int ret = 0, now;
  while (spfa()) {
    ret += dis[T];
    for (now = T; now != S; now = fa[now]) {
      e[fr[now]].flow--;
      e[fr[now] ^ 1].flow++;
    }
  }
  return ret;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  T = 2 * n + 2;
  add(S, 2 * n + 1, m, 0);
  for (int i = 1; i <= n; i++) {
    add(i, i + n, 1, -100000);
    add(2 * n + 1, i, 1, calc(a[i]));
    add(i + n, T, 1, 0);
  }
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      add(i + n, j, 1, a[i] == a[j] ? 0 : calc(a[j]));
  int tmp = dinic() + n * 100000, ret = 0;
  for (int i = 4; i <= tp; i += 2)
    if (!e[i].flow && e[i].cost > 0) ret++;
  printf("%d %d\n", ret + n, tmp);
  for (int tot = 0, i = 1; i <= n; i++) {
    for (int j = h[i]; j; j = e[j].next)
      if (e[j].flow && e[j].to > n && e[j].to <= 2 * n) {
        from[i] = e[j].to - n;
        break;
      }
    if (!from[i]) {
      rk[i] = tot++;
      printf("%c=%d\n", 'a' + rk[i], a[i]);
      printf("print(%c)\n", rk[i] + 'a');
    } else {
      rk[i] = rk[from[i]];
      if (a[from[i]] != a[i]) printf("%c=%d\n", 'a' + rk[i], a[i]);
      printf("print(%c)\n", 'a' + rk[i]);
    }
  }
}