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 MAXN = 1000;
const int MAXM = 100000;
const int INF = 1000000;
int n, m;
int a[250], variable[250], match[250];
vector<string> ans;
int s, t, nodes, edges;
int head[MAXN], adj[MAXM], from[MAXM], to[MAXM], cap[MAXM], cost[MAXM];
int dist[MAXN], pre[MAXN], q[MAXN], visited[MAXN];
void addEdge(int From, int To, int Cap, int Cost) {
  adj[edges] = head[From];
  from[edges] = From;
  to[edges] = To;
  cap[edges] = Cap;
  cost[edges] = Cost;
  head[From] = edges++;
  adj[edges] = head[To];
  from[edges] = To;
  to[edges] = From;
  cap[edges] = 0;
  cost[edges] = -Cost;
  head[To] = edges++;
}
int minCostFlow() {
  int ret = 0;
  while (1) {
    for (int i = 0; i < nodes; i++) dist[i] = INF;
    dist[s] = 0;
    memset(visited, 0, sizeof(visited));
    visited[s] = 1;
    int l = 0, r = 0;
    q[r++] = s;
    while (l != r) {
      int cur = q[l++];
      if (l == nodes) l = 0;
      visited[cur] = 0;
      for (int i = head[cur]; i != -1; i = adj[i])
        if (cap[i] > 0 && dist[to[i]] > dist[cur] + cost[i]) {
          dist[to[i]] = dist[cur] + cost[i];
          pre[to[i]] = i;
          if (!visited[to[i]]) {
            visited[to[i]] = 1;
            q[r++] = to[i];
            if (r == nodes) r = 0;
          }
        }
    }
    if (dist[t] == INF) break;
    ret += dist[t];
    int cur = t;
    while (cur != s) {
      if (cur % 2 == 1 && cur < 2 * n) match[cur / 2] = from[pre[cur]];
      cap[pre[cur]]--;
      cap[pre[cur] ^ 1]++;
      cur = from[pre[cur]];
    }
  }
  return ret;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  nodes = n * 2 + m + 2;
  edges = 0;
  s = nodes - 1;
  t = nodes - 2;
  memset(head, -1, sizeof(head));
  for (int i = 0; i < n; i++) {
    addEdge(s, i * 2, 1, 0);
    addEdge(i * 2 + 1, t, 1, 0);
    for (int j = i + 1; j < n; j++)
      addEdge(i * 2, j * 2 + 1, 1,
              (a[i] == a[j]) ? 0 : __builtin_popcount(a[j]));
  }
  for (int i = 0; i < m; i++) {
    addEdge(s, n * 2 + i, 1, 0);
    for (int j = 0; j < n; j++)
      addEdge(n * 2 + i, j * 2 + 1, 1, __builtin_popcount(a[j]));
  }
  int penalty = minCostFlow();
  for (int i = 0; i < n; i++) {
    char ch;
    ostringstream s;
    if (match[i] >= 2 * n) {
      variable[i] = match[i] - 2 * n;
      ch = 'a' + variable[i];
      s.str("");
      s << ch << "=" << a[i];
      ans.push_back(s.str());
      s.str("");
      s << "print(" << ch << ")";
      ans.push_back(s.str());
    } else {
      variable[i] = variable[match[i] / 2];
      ch = 'a' + variable[i];
      if (a[i] != a[match[i] / 2]) {
        s.str("");
        s << ch << "=" << a[i];
        ans.push_back(s.str());
      }
      s.str("");
      s << "print(" << ch << ")";
      ans.push_back(s.str());
    }
  }
  cout << ans.size() << " " << penalty << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
  return 0;
}