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 nmax = 1e3 + 42, inf = 1e5;
struct edge {
  int from, to, flow, cost;
};
vector<int> adj[nmax];
vector<edge> all;
void add_edge(int from, int to, int flow, int cost) {
  edge current;
  current.from = from;
  current.to = to;
  current.flow = flow;
  current.cost = cost;
  adj[from].push_back(all.size());
  all.push_back(current);
  swap(current.from, current.to);
  current.flow = 0;
  current.cost = -cost;
  adj[to].push_back(all.size());
  all.push_back(current);
}
int source, sink;
int n, m;
int parent[nmax];
int cost[nmax];
void bellman() {
  for (int i = source; i <= sink; i++) {
    parent[i] = -1;
    cost[i] = 1e9;
  }
  parent[source] = 0;
  cost[source] = 0;
  bool change = 1;
  while (change) {
    change = 0;
    for (int i = source; i <= sink; i++)
      for (auto k : adj[i])
        if (all[k].flow && cost[all[k].from] + all[k].cost < cost[all[k].to]) {
          cost[all[k].to] = cost[all[k].from] + all[k].cost;
          parent[all[k].to] = k;
          change = 1;
        }
  }
}
int min_cost_max_flow() {
  int total_flow = 0, total_cost = 0;
  while (1) {
    bellman();
    if (parent[sink] == -1) break;
    if (total_flow >= n - m && cost[sink] >= 0) break;
    int node = sink, cost_now = 0;
    while (node != source) {
      int used_edge = parent[node];
      all[used_edge].flow--;
      all[used_edge ^ 1].flow++;
      cost_now += all[used_edge].cost;
      node = all[used_edge].from;
    }
    total_flow++;
    total_cost = total_cost + cost_now;
  }
  return total_cost;
}
int arr[nmax];
int bits[nmax];
int cnt(int num) {
  int ret = 0;
  while (num) {
    ret = ret + num % 2;
    num = num / 2;
  }
  return ret;
}
int which[nmax];
vector<pair<int, int> > edges;
void solve(int lines, int current, int cst) {
  if (current == 0) {
    printf("%i %i\n", lines, cst);
    return;
  }
  int prv = -1;
  for (int j = current - 1; j >= 1; j--)
    if (which[j] == which[current]) {
      prv = j;
      break;
    }
  if (prv == -1) {
    solve(lines + 2, current - 1, cst);
    printf("%c=%i\n", char(which[current] - 1 + 'a'), arr[current]);
    printf("print(%c)\n", char(which[current] - 1 + 'a'));
  } else {
    if (arr[prv] == arr[current])
      solve(lines + 1, current - 1, cst);
    else {
      solve(lines + 2, current - 1, cst);
      printf("%c=%i\n", char(which[current] - 1 + 'a'), arr[current]);
    }
    printf("print(%c)\n", char(which[current] - 1 + 'a'));
  }
}
int main() {
  scanf("%i%i", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%i", &arr[i]);
    bits[i] = cnt(arr[i]);
  }
  source = 0;
  sink = 2 * n + 1;
  for (int i = 1; i <= n; i++) add_edge(source, i, 1, 0);
  for (int j = 1; j <= n; j++) add_edge(j + n, sink, 1, 0);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      add_edge(i, j + n, 1, (arr[i] == arr[j] ? -bits[j] : 0));
  int sum = 0;
  for (int i = 1; i <= n; i++) sum = sum + bits[i];
  sum = sum + min_cost_max_flow();
  for (auto k : all)
    if (1 <= k.from && k.from <= n && n + 1 <= k.to && k.to <= n + n &&
        k.flow == 0)
      edges.push_back({k.from, k.to - n});
  int current = 0;
  for (int i = 1; i <= n; i++) {
    if (which[i] == 0) {
      current++;
      which[i] = current;
    }
    for (auto k : edges)
      if (k.first == i) which[k.second] = which[i];
  }
  solve(0, n, sum);
  return 0;
}