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;
vector<int> E[600];
int cost[600][600], cap[600][600], flow[600][600];
int pi[1000];
inline int ecap(int u, int v) {
  if (flow[v][u])
    return flow[v][u];
  else
    return cap[u][v] - flow[u][v];
}
inline int ecost(int u, int v) {
  if (flow[v][u])
    return -cost[v][u] + pi[u] - pi[v];
  else
    return cost[u][v] + pi[u] - pi[v];
}
int par[600], dist[600], fix[600];
bool augment(int s, int t, int n) {
  for (int i = 0; i < n; i++) dist[i] = (1 << 30), par[i] = -1, fix[i] = false;
  dist[s] = 0;
  int u = s;
  while (u != -1) {
    fix[u] = true;
    for (typeof E[u].begin() v = E[u].begin(); v != E[u].end(); v++)
      if (ecap(u, *v) && dist[*v] > ecost(u, *v) + dist[u])
        dist[*v] = dist[u] + ecost(u, *v), par[*v] = u;
    u = -1;
    for (int v = 0; v < n; v++)
      if (!fix[v] && dist[v] != (1 << 30) && (u == -1 || dist[v] < dist[u]))
        u = v;
  }
  for (int i = 0; i < n; i++)
    if (dist[i] != (1 << 30)) pi[i] += dist[i];
  return par[t] != -1;
}
int mcmf(int s, int t, int n) {
  int costo = 0;
  for (int i = 0; i < n; i++) pi[i] = 0;
  while (augment(s, t, n)) {
    for (int u = par[t], v = t; v != s; u = par[v = u])
      if (flow[v][u])
        flow[v][u]--, costo -= cost[v][u];
      else
        flow[u][v]++, costo += cost[u][v];
  }
  return costo;
}
void addedge(int u, int v, int c) {
  E[u].push_back(v);
  E[v].push_back(u);
  cap[u][v] = 1;
  cost[u][v] = c;
}
int x[250];
int who[250];
int last[25];
int main() {
  memset(cost, 0, sizeof cost);
  memset(flow, 0, sizeof flow);
  memset(cap, 0, sizeof cap);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> x[i];
  int s = m + n + n, t = s + 1, sz = t + 1;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      addedge(i, j + n + m, x[i] == x[j] ? 0 : __builtin_popcount(x[j]));
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++)
      addedge(i + n, j + n + m, __builtin_popcount(x[j]));
  for (int i = 0; i < m; i++) addedge(s, i + n, 0);
  for (int i = 0; i < n; i++) addedge(s, i, 0), addedge(i + n + m, t, 0);
  int costo = mcmf(s, t, sz);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++)
      if (flow[j + n][i + n + m]) who[i] = j;
    for (int j = 0; j < n; j++)
      if (flow[j][i + n + m]) who[i] = who[j];
  }
  memset(last, -1, sizeof last);
  vector<string> ret;
  for (int i = 0; i < n; i++) {
    if (last[who[i]] != x[i]) {
      ostringstream os;
      os << char('a' + who[i]) << "=" << x[i];
      ret.push_back(os.str());
    }
    ostringstream os;
    os << "print(" << char('a' + who[i]) << ")";
    ret.push_back(os.str());
    last[who[i]] = x[i];
  }
  cout << ret.size() << " " << costo << endl;
  for (int i = 0; i < ret.size(); i++) cout << ret[i] << endl;
}