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 INF = 1000000007;
vector<tuple<int, int, int, int>> e[512];
void add_edge(int x, int y, int c, int w) {
  e[x].push_back(tuple<int, int, int, int>(y, c, +w, e[y].size()));
  e[y].push_back(tuple<int, int, int, int>(x, 0, -w, e[x].size() - 1));
}
int flow(int S, int T) {
  int d[512], q[512], in[512] = {}, pop = 0, push = 0, cost = 0;
  vector<tuple<int, int, int, int>>::iterator r[512];
AUGMENT:
  memset(d, 63, sizeof(d));
  d[q[push++ & 511] = S] = 0;
  while (pop != push) {
    int x = q[pop++ & 511];
    in[x] = 0;
    for (auto it = e[x].begin(); it != e[x].end(); ++it)
      if (get<1>(*it)) {
        int y = get<0>(*it);
        int w = get<2>(*it);
        if (d[x] + w < d[y]) {
          d[y] = d[x] + w;
          r[y] = it;
          if (!in[y]) in[q[push++ & 511] = y] = 1;
        }
      }
  }
  if (d[T] >= INF) return cost;
  for (int x = T; x != S; x = get<0>(e[get<0>(*r[x])][get<3>(*r[x])])) {
    get<1>(*r[x])--;
    get<1>(e[get<0>(*r[x])][get<3>(*r[x])])++;
    cost += get<2>(*r[x]);
  }
  goto AUGMENT;
}
int main() {
  int n, m, a[250], c[250];
  scanf("%d%d", &n, &m);
  int S = 0, T = n * 2 + 2, depS = n * 2 + 3, depT = n * 2 + 4;
  vector<pair<pair<int, int>, int>> u;
  add_edge(S, 1, m, 0);
  add_edge(1, T, m, 0);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    c[i] = __builtin_popcount(a[i]);
    u.push_back({{i + 2, 1}, e[i + 2].size()});
    add_edge(1, i + 2, 1, c[i]);
    add_edge(i + n + 2, T, 1, 0);
    add_edge(depS, i + n + 2, 1, 0);
    add_edge(i + 2, depT, 1, 0);
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      u.push_back({{j + 2, i + n + 2}, e[j + 2].size()});
      add_edge(i + n + 2, j + 2, 1, a[i] != a[j] ? c[j] : 0);
    }
  add_edge(T, S, m, 0);
  int cost = flow(depS, depT), tag[512] = {}, ans = 0, cnt = 0;
  e[S].pop_back();
  e[T].pop_back();
  cost += flow(S, T);
  sort(u.begin(), u.end());
  for (size_t i = 0; i < u.size(); i++) {
    int x = u[i].first.first;
    int y = u[i].first.second;
    int c = get<1>(e[x][u[i].second]);
    if (!c) continue;
    if (y == 1)
      ans += 2;
    else
      ans += 1 + (a[x - 2] != a[y - n - 2]);
  }
  printf("%d %d\n", ans, cost);
  for (size_t i = 0; i < u.size(); i++) {
    int x = u[i].first.first;
    int y = u[i].first.second;
    int c = get<1>(e[x][u[i].second]);
    if (!c) continue;
    if (y == 1) {
      tag[x - 2] = cnt++;
      printf("%c=%d\n", tag[x - 2] + 'a', a[x - 2]);
    } else {
      tag[x - 2] = tag[y - n - 2];
      if (a[x - 2] != a[y - n - 2])
        printf("%c=%d\n", tag[x - 2] + 'a', a[x - 2]);
    }
    printf("print(%c)\n", tag[x - 2] + 'a');
  }
}