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 = 500;
const int MAXM = MAXN * MAXN;
const int INF = 0x3f3f3f3f;
struct node {
  int v, c, w;
  node *next, *back;
} Edges[MAXM * 2 + 10], *ecnt = Edges, *adj[MAXN + 10], *Fa[MAXN + 10];
void addedge(int u, int v, int c, int w) {
  ++ecnt;
  ecnt->v = v;
  ecnt->c = c;
  ecnt->w = w;
  ecnt->back = ecnt + 1;
  ecnt->next = adj[u];
  adj[u] = ecnt;
  ++ecnt;
  ecnt->v = u;
  ecnt->c = 0;
  ecnt->w = -w;
  ecnt->back = ecnt - 1;
  ecnt->next = adj[v];
  adj[v] = ecnt;
}
int str[MAXN + 10], dis[MAXN + 10];
bool insta[MAXN + 10];
bool bfs(int s, int t) {
  memset(dis, 0x3f, sizeof dis);
  dis[s] = 0;
  str[s] = INF;
  queue<int> que;
  que.push(s);
  while (!que.empty()) {
    int u = que.front();
    que.pop();
    insta[u] = false;
    for (node *p = adj[u]; p; p = p->next) {
      if (p->c && dis[p->v] > dis[u] + p->w) {
        dis[p->v] = dis[u] + p->w;
        str[p->v] = min(str[u], p->c);
        Fa[p->v] = p;
        if (!insta[p->v]) {
          insta[p->v] = true;
          que.push(p->v);
        }
      }
    }
  }
  return dis[t] != INF;
}
pair<int, int> work(int s, int t) {
  int sum_w = 0, sum_s = 0;
  while (bfs(s, t)) {
    sum_s += str[t];
    sum_w += str[t] * dis[t];
    int now = t;
    while (now != s) {
      Fa[now]->c -= str[t];
      Fa[now]->back->c += str[t];
      now = Fa[now]->back->v;
    }
  }
  return make_pair(sum_w, sum_s);
}
int a[MAXN + 10], var_pos[MAXN + 10];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int S2 = 0, T = 2 * n + 2, S1 = 2 * n + 1;
  int SS = T + 1, TT = T + 2;
  addedge(S1, S2, m, 0);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    addedge(SS, i + n, 1, 0);
    addedge(i, TT, 1, 0);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j < i; j++) {
      if (a[i] == a[j])
        addedge(j + n, i, m, 0);
      else
        addedge(j + n, i, m, __builtin_popcount(a[i]));
    }
    addedge(0, i, m, __builtin_popcount(a[i]));
    addedge(i + n, T, m, 0);
  }
  addedge(S2, T, m, 0);
  addedge(T, S1, INF, 0);
  int res = 0;
  res += work(SS, TT).first;
  res += work(S1, T).first;
  queue<pair<int, int> > ans;
  for (int i = 1; i <= n; i++) {
    int prev_pos = -1;
    bool need_recalc = false;
    for (node *p = adj[i]; p; p = p->next) {
      if (p->c) prev_pos = max(0, p->v - n), need_recalc = p->back->w > 0;
    }
    for (int j = 1; j <= m; j++) {
      if (var_pos[j] == prev_pos) {
        var_pos[j] = i;
        if (need_recalc) ans.push(make_pair(j, a[i]));
        ans.push(make_pair(0, j));
        break;
      }
    }
  }
  printf("%d %d\n", (int)ans.size(), res);
  while (!ans.empty()) {
    pair<int, int> u = ans.front();
    ans.pop();
    if (u.first)
      printf("%c=%d\n", u.first - 1 + 'a', u.second);
    else
      printf("print(%c)\n", u.second - 1 + 'a');
  }
  return 0;
}