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 foo = (int)1e9;
const int coo = (int)1e9;
namespace MincostMaxflow {
const int maxv = 1e5 + 5;
const int maxe = 1e6 + 5;
int n, s, t, E;
int adj[maxe], nxt[maxe], lst[maxv], frm[maxv], vis[maxv];
int cap[maxe], flw[maxe], totalFlow;
int cst[maxe], dst[maxv], totalCost;
void init(int nn, int ss, int tt) {
  n = nn, s = ss, t = tt;
  fill_n(lst, n, -1), E = 0;
}
int add(int u, int v, int ca, int co) {
  int ret = E;
  adj[E] = v, cap[E] = ca, flw[E] = 0, cst[E] = +co, nxt[E] = lst[u],
  lst[u] = E++;
  adj[E] = u, cap[E] = 0, flw[E] = 0, cst[E] = -co, nxt[E] = lst[v],
  lst[v] = E++;
  return ret;
}
int spfa() {
  fill_n(dst, n, coo), dst[s] = 0;
  queue<int> que;
  que.push(s);
  while (que.size()) {
    int u = que.front();
    que.pop();
    for (int e = lst[u]; e != -1; e = nxt[e])
      if (flw[e] < cap[e]) {
        int v = adj[e];
        if (dst[v] > dst[u] + cst[e]) {
          dst[v] = dst[u] + cst[e];
          frm[v] = e;
          if (!vis[v]) {
            vis[v] = 1;
            que.push(v);
          }
        }
      }
    vis[u] = 0;
  }
  return dst[t] < coo;
}
int mincost() {
  totalCost = 0, totalFlow = 0;
  while (1) {
    if (!spfa()) break;
    int mn = foo;
    for (int v = t, e = frm[v]; v != s; v = adj[e ^ 1], e = frm[v])
      mn = min(mn, cap[e] - flw[e]);
    for (int v = t, e = frm[v]; v != s; v = adj[e ^ 1], e = frm[v]) {
      flw[e] += mn;
      flw[e ^ 1] -= mn;
    }
    totalFlow += mn;
    totalCost += mn * dst[t];
  }
  return totalCost;
}
int getFlow(int id) { return flw[id]; }
}  // namespace MincostMaxflow
int a[500], f[500];
int n, m;
vector<pair<int, int> > edges;
vector<int> W, ID;
int pre[500], isFirst[500];
int isChange[500];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    f[i] = __builtin_popcount(a[i]);
  }
  int S = 0, T = 2 * n + m + 1;
  MincostMaxflow::init(T + 1, S, T);
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (a[i] == a[j]) {
        int id = MincostMaxflow::add(i, j + n, 1, 0);
        int w = 0;
        edges.push_back(pair<int, int>(i, j + n));
        ID.push_back(id);
      } else {
        int id = MincostMaxflow::add(i, j + n, 1, f[j]);
        int w = f[j];
        edges.push_back(pair<int, int>(i, j + n));
        ID.push_back(id);
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      int id = MincostMaxflow::add(2 * n + i, n + j, 1, f[j]);
      int w = f[j];
      edges.push_back(pair<int, int>(2 * n + i, n + j));
      ID.push_back(id);
    }
  }
  for (int i = 1; i <= m; i++) {
    MincostMaxflow::add(S, 2 * n + i, 1, 0);
  }
  for (int i = 1; i <= n; i++) {
    MincostMaxflow::add(S, i, 1, 0);
    MincostMaxflow::add(n + i, T, 1, 0);
  }
  int ansSecond = MincostMaxflow::mincost();
  int ansFirst = 0;
  for (int i = 0; i < edges.size(); i++) {
    int id = ID[i];
    int u = edges[i].first;
    int v = edges[i].second;
    if (MincostMaxflow::getFlow(id) == 1) {
      if (u > 2 * n) {
        isFirst[v - n] = 1;
        pre[v - n] = u - 2 * n - 1;
        ansFirst += 2;
      } else {
        if (a[v - n] == a[u]) {
          pre[v - n] = u;
          ansFirst += 1;
        } else {
          isChange[v - n] = 1;
          pre[v - n] = u;
          ansFirst += 2;
        }
      }
    }
  }
  cout << ansFirst << " " << ansSecond << "\n";
  for (int i = 1; i <= n; i++) {
    if (isFirst[i]) {
      cout << (char)(pre[i] + 'a') << '=' << a[i] << "\n";
      cout << "print(" << (char)(pre[i] + 'a') << ")\n";
    } else {
      int u = i;
      while (isFirst[u] == 0) {
        u = pre[u];
      }
      if (isChange[i]) {
        cout << (char)(pre[u] + 'a') << '=' << a[i] << "\n";
      }
      cout << "print(" << (char)(pre[u] + 'a') << ")\n";
    }
  }
}