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>
int xx[] = {1, 1, 0, -1, -1, -1, 0, 1}, yy[] = {0, 1, 1, 1, 0, -1, -1, -1};
using namespace std;
int cst[555][555], par[555], source, sink, flow, dist[555];
struct pq {
  int cost, node;
  pq(int x, int y) { node = x, cost = y; }
  bool operator<(const pq &b) const { return (cost > b.cost); }
};
vector<pq> adj[555];
void addedge(int u, int v, int c, int w) {
  adj[u].push_back(pq(v, w));
  adj[v].push_back(pq(u, -w));
  cst[u][v] = c, cst[v][u] = 0;
}
bool aug_path() {
  int i, now, nxt, nc, xc;
  priority_queue<pq> Q;
  Q.push(pq(source, 0));
  for (i = source; i <= sink; i++) dist[i] = (1 << 30);
  memset(par, -1, sizeof par);
  dist[source] = 0;
  while (!Q.empty()) {
    now = Q.top().node, nc = Q.top().cost;
    Q.pop();
    if (now == sink) return true;
    for (i = 0; i < (int)adj[now].size(); i++) {
      nxt = adj[now][i].node, xc = adj[now][i].cost;
      if ((dist[nxt] > (xc + dist[now])) && (cst[now][nxt] > 0)) {
        dist[nxt] = dist[now] + xc;
        par[nxt] = now;
        Q.push(pq(nxt, dist[now] + xc));
      }
    }
  }
  if (dist[sink] != (1 << 30)) return true;
  return false;
}
int chld[555];
void path_upd(int v) {
  int u = par[v];
  chld[v] = u;
  flow = min(flow, cst[u][v]);
  if (u != source) path_upd(u);
  cst[u][v] -= flow;
  cst[v][u] += flow;
  return;
}
int maxflow() {
  int ret = 0, cnt = 0;
  while (aug_path()) {
    flow = (1 << 30);
    path_upd(sink);
    ret += (flow * dist[sink]);
  }
  return ret;
}
int arr[255], val[255];
char cc[255];
int main() {
  int n, m, nds;
  while (scanf("%d%d", &n, &m) == 2) {
    int i, j, u, v, w;
    source = 0;
    sink = n + n + m + 1;
    nds = n + m;
    for (i = source; i <= sink; i++) adj[i].clear();
    memset(cst, false, sizeof cst);
    for (i = 1; i <= n; i++) {
      scanf("%d", &arr[i]);
      val[i] = __builtin_popcount(arr[i]);
    }
    for (i = 1; i <= n; i++) {
      addedge(source, i, 1, 0);
      addedge(i + nds, sink, 1, 0);
      for (j = i + 1; j <= n; j++) {
        if (arr[i] == arr[j])
          addedge(i, j + nds, 1, 0);
        else
          addedge(i, j + nds, 1, val[j]);
      }
    }
    for (i = 1; i <= m; i++) {
      addedge(source, i + n, 1, 0);
      for (j = 1; j <= n; j++) {
        addedge(i + n, j + nds, 1, val[j]);
      }
    }
    int ans = maxflow();
    int val = 0, now;
    for (j = 1; j <= n; j++) {
      i = chld[j + nds];
      if (i <= n) {
        if (arr[j] != arr[i]) val++;
      } else
        val++;
    }
    printf("%d %d\n", n + val, ans);
    for (j = 1; j <= n; j++) {
      i = chld[j + nds];
      if (i <= n) {
        if (arr[j] == arr[i])
          printf("print(%c)\n", cc[i]);
        else {
          printf("%c=%d\n", cc[i], arr[j]);
          printf("print(%c)\n", cc[i]);
        }
        cc[j] = cc[i];
      } else {
        printf("%c=%d\n", i - n - 1 + 'a', arr[j]);
        printf("print(%c)\n", i - n - 1 + 'a');
        cc[j] = i - n - 1 + 'a';
      }
    }
  }
  return 0;
}