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;
int vt, ve[(2 * 600 * 600)], re[(2 * 600 * 600)], ze[(2 * 600 * 600)],
    nextt[(2 * 600 * 600)];
int in[600], head[600], path[600], dis[600], qu[600], lim[600];
void init() {
  vt = 1;
  memset(head, 0, sizeof(head));
}
int auxm;
void add(int x, int y, int cap, int wei = 0) {
  ++auxm;
  ve[++vt] = y;
  re[vt] = cap;
  ze[vt] = wei;
  nextt[vt] = head[x];
  head[x] = vt;
  ve[++vt] = x;
  re[vt] = 0;
  ze[vt] = -wei;
  nextt[vt] = head[y];
  head[y] = vt;
}
int mfmc(int s, int t, int n, int &fcost) {
  int flow = fcost = 0;
  while (1) {
    int qt = 0, k = 0;
    qu[qt++] = s;
    for (int i = 0; i < n; i++) dis[i] = lim[i] = 0x3f3f3f3f;
    dis[s] = 0;
    while (k != qt) {
      if (k == 600) k = 0;
      int x = qu[k++];
      for (int i = head[x]; i; i = nextt[i])
        if (re[i] && dis[x] + ze[i] < dis[ve[i]]) {
          dis[ve[i]] = dis[x] + ze[i];
          path[ve[i]] = i;
          lim[ve[i]] = min(lim[x], re[i]);
          if (!in[ve[i]]) {
            if (qt == 600) qt = 0;
            qu[qt++] = ve[i];
            in[ve[i]] = 1;
          }
        }
      in[x] = 0;
    }
    if (dis[t] == 0x3f3f3f3f) break;
    int f = lim[t];
    for (int p = t; p != s; p = ve[path[p] ^ 1]) {
      re[path[p]] -= f;
      re[path[p] ^ 1] += f;
    }
    fcost += f * dis[t];
    flow += f;
  }
  return flow;
}
bool mark[600];
void DFS(int u) {
  mark[u] = true;
  for (int i = head[u]; i; i = nextt[i]) {
    if (i % 2) continue;
    int v = ve[i];
    if (!mark[v] && re[i] > 0) {
      DFS(v);
    }
  }
}
void mincut(int s, int t, int n) {
  memset(mark, 0, sizeof(mark));
  DFS(s);
  for (int i = 0; i < n; i++)
    for (int j = head[i]; j; j = nextt[j]) {
      if (j % 2) continue;
      int v = ve[j];
      if (mark[i] && !mark[v]) printf("%d %d\n", i, v);
    }
}
int v[300];
int aux[300];
int varval[300];
int var[300];
int main() {
  ios::sync_with_stdio(false);
  ;
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < (n); ++i) cin >> v[i];
  init();
  for (int i = 0; i < (m); ++i) {
    add(0, i + 1, 1);
    for (int j = 0; j < (n); ++j)
      add(i + 1, m + n + 1 + j, 1, __builtin_popcount(v[j]));
  }
  for (int i = 0; i < (n); ++i) {
    add(0, m + 1 + i, 1);
    add(m + n + 1 + i, m + 2 * n + 1, 1);
    for (int j = i + 1; j < (n); ++j) {
      int cost = v[i] == v[j] ? 0 : __builtin_popcount(v[j]);
      add(m + 1 + i, m + n + 1 + j, 1, cost);
    }
  }
  int fcost, flow = mfmc(0, m + 2 * n + 1, m + 2 * n + 2, fcost);
  for (int i = 1; i <= auxm; i++) {
    int u = ve[2 * i + 1];
    int v = ve[2 * i];
    int f = re[2 * i + 1];
    if (f == 1 && v >= m + n + 1 && v <= m + 2 * n) {
      aux[v - m - n - 1] = u;
    }
  }
  vector<string> ans;
  memset(varval, -1, sizeof(varval));
  for (int i = 0; i < (n); ++i) {
    int u = aux[i];
    if (u >= 1 && u <= m) {
      varval[u - 1] = v[i];
      string str;
      str += (char)('a' + u - 1);
      str += "=";
      str += to_string(v[i]);
      ans.push_back(str);
      var[i] = u - 1;
    } else {
      var[i] = var[u - m - 1];
      if (varval[var[i]] != v[i]) {
        string str;
        str += (char)('a' + var[i]);
        str += "=";
        str += to_string(v[i]);
        ans.push_back(str);
        varval[var[i]] = v[i];
      }
    }
    string str = "print(";
    str += (char)('a' + var[i]);
    str += ")";
    ans.push_back(str);
  }
  cout << ans.size() << " " << fcost << "\n";
  for (__typeof((ans).begin()) it = (ans).begin(); it != (ans).end(); ++it)
    cout << *it << endl;
}