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 edge {
  int v, rev, cap, flow, cost;
  edge(int _v, int _rev, int _cap, int _flow, int _cost) {
    v = _v;
    rev = _rev;
    cap = _cap;
    flow = _flow;
    cost = _cost;
  }
  edge() {}
};
vector<pair<int, int> > path;
vector<vector<edge> > AdjList;
int f = 0;
long long total_cost = 0;
void addEdge(int u, int v, int cap, int cost) {
  int k = AdjList[v].size(), l = AdjList[u].size();
  AdjList[u].push_back(edge(v, k, cap, 0, cost));
  AdjList[v].push_back(edge(u, l, 0, 0, -cost));
}
void augment(int s, int v, int min_edge) {
  if (v == s) {
    f = min_edge;
    return;
  }
  int u = path[v].first, i = path[v].second;
  if (u != -1) {
    int res = AdjList[u][i].cap - AdjList[u][i].flow;
    augment(s, u, min(res, min_edge));
    AdjList[u][i].flow += f;
    AdjList[v][AdjList[u][i].rev].flow -= f;
    total_cost += 1LL * AdjList[u][i].cost * f;
  }
}
int minCostMaxFlow(int s, int t, int N) {
  int maxflow = 0;
  path.resize(N);
  while (true) {
    f = 0;
    vector<long long> dist(N, 1000000000);
    vector<bool> IN(N, false);
    dist[s] = 0;
    path[t] = make_pair(-1, -1);
    queue<int> cola;
    cola.push(s);
    IN[s] = true;
    while (!cola.empty()) {
      int u = cola.front();
      cola.pop();
      IN[u] = false;
      for (int i = (0); i < ((int)AdjList[u].size()); ++i) {
        edge e = AdjList[u][i];
        if (e.cap - e.flow > 0 and dist[e.v] > dist[u] + e.cost) {
          dist[e.v] = dist[u] + e.cost;
          path[e.v] = make_pair(u, i);
          if (!IN[e.v]) cola.push(e.v), IN[e.v] = true;
        }
      }
    }
    augment(s, t, 1000000000);
    if (!f) break;
    maxflow += f;
  }
  return maxflow;
}
int a[255], last[255], var[255];
void dfs(int u, int n, int id) {
  if (u == 2 * n + 2) return;
  if (u >= 2 and u <= n + 1) var[u - 2] = id;
  for (int i = (0); i < ((int)AdjList[u].size()); ++i)
    if (AdjList[u][i].flow == 1) dfs(AdjList[u][i].v, n, id);
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = (0); i < (n); ++i) scanf("%d", &a[i]);
  AdjList.assign(2 * n + 3, vector<edge>());
  addEdge(0, 1, m, 0);
  addEdge(1, 2 * n + 2, 1000000000, 0);
  for (int i = (0); i < (n); ++i) {
    addEdge(1, i + 2, 1, __builtin_popcount(a[i]));
    addEdge(i + 2, i + n + 2, 1, -1000000000);
    for (int j = (i + 1); j < (n); ++j) {
      int cost = a[i] == a[j] ? 0 : __builtin_popcount(a[j]);
      addEdge(i + n + 2, j + 2, 1, cost);
    }
    addEdge(i + n + 2, 2 * n + 2, 1, 0);
  }
  int maxflow = minCostMaxFlow(0, 2 * n + 2, 2 * n + 3);
  int cont = 0;
  for (int i = (0); i < ((int)AdjList[1].size()); ++i)
    if (AdjList[1][i].flow == 1) dfs(AdjList[1][i].v, n, cont++);
  int lineas = 0;
  memset(last, -1, sizeof last);
  for (int i = (0); i < (n); ++i) {
    if (last[var[i]] != a[i]) ++lineas;
    ++lineas;
    last[var[i]] = a[i];
  }
  printf("%d %I64d\n", lineas, total_cost + 1LL * n * 1000000000);
  memset(last, -1, sizeof last);
  for (int i = (0); i < (n); ++i) {
    if (last[var[i]] != a[i]) printf("%c=%d\n", 'a' + var[i], a[i]);
    printf("print(%c)\n", 'a' + var[i]);
    last[var[i]] = a[i];
  }
  return 0;
}