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;
struct MCF {
  int V, E, tf, tc;
  vector<int> la, nxt, oppo, capa, cost;
  void init(int V_) {
    V = V_;
    E = tf = tc = 0;
    la.clear();
    nxt.clear();
    oppo.clear();
    capa.clear();
    cost.clear();
    la = vector<int>(V, -1);
  }
  void add(int u, int v, int ca, int co) {
    nxt.push_back(la[u]);
    la[u] = E++;
    oppo.push_back(v);
    capa.push_back(ca);
    cost.push_back(co);
  }
  bool spfa(int src, int snk) {
    vector<int> dist(V, 1e9), inq(V, 0), fe(V, -1);
    queue<int> q;
    q.push(src);
    inq[src] = 1;
    dist[src] = 0;
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      inq[u] = 0;
      for (int i = la[u]; i != -1; i = nxt[i]) {
        int v = oppo[i];
        if (capa[i] && dist[v] > dist[u] + cost[i]) {
          dist[v] = dist[u] + cost[i];
          fe[v] = i;
          if (!inq[v]) {
            q.push(v);
            inq[v] = 1;
          }
        }
      }
    }
    if (dist[snk] == 1e9) return false;
    tf++;
    tc += dist[snk];
    int u = snk;
    while (u != src) {
      int e = fe[u];
      capa[e]--;
      capa[e ^ 1]++;
      u = oppo[e ^ 1];
    }
    return true;
  }
} mcf;
int N, M;
int A[300], B[300];
int bit_count(int v) {
  int ret = 0;
  while (v) {
    if (v & 1) ret++;
    v >>= 1;
  }
  return ret;
}
vector<pair<int, int> > sol;
int main() {
  scanf("%d %d", &N, &M);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  int V = M + 2 * N + 2, src = V - 2, snk = V - 1;
  mcf.init(V);
  for (int i = 0; i < M + N; i++) {
    mcf.add(src, i, 1, 0);
    mcf.add(i, src, 0, 0);
  }
  for (int i = 0; i < N; i++) {
    mcf.add(M + N + i, snk, 1, 0);
    mcf.add(snk, M + N + i, 0, 0);
  }
  for (int i = 0; i < M; i++) {
    for (int j = 0; j < N; j++) {
      int w = bit_count(A[j]);
      mcf.add(i, M + N + j, 1, w);
      mcf.add(M + N + j, i, 0, -w);
    }
  }
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      int w = A[i] == A[j] ? 0 : bit_count(A[j]);
      mcf.add(M + i, M + N + j, 1, w);
      mcf.add(M + N + j, M + i, 0, -w);
    }
  }
  while (mcf.spfa(src, snk))
    ;
  for (int i = 0; i < N; i++) {
    int u = M + N + i;
    for (int j = mcf.la[u]; j != -1; j = mcf.nxt[j]) {
      int v = mcf.oppo[j];
      if (v != snk && mcf.capa[j]) {
        B[i] = v < M ? v : B[v - M];
        if (v < M || A[v - M] != A[i]) {
          sol.push_back({B[i], A[i]});
        }
      }
    }
    sol.push_back({B[i], -1});
  }
  printf("%d %d\n", sol.size(), mcf.tc);
  for (int i = 0; i < sol.size(); i++) {
    if (sol[i].second == -1)
      printf("print(%c)\n", 'a' + sol[i].first);
    else
      printf("%c=%d\n", 'a' + sol[i].first, sol[i].second);
  }
}