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 N = 260;
const int S = 0, D = 561;
const int inf = 1000000000;
int n, m, x[N];
struct st {
  int tip, nr, val;
};
vector<int> v[4 * N];
int cost[4 * N][4 * N], drum, costmin, cap[4 * N][4 * N], flux[4 * N][4 * N];
vector<st> rez;
bool fol[4 * N];
int dist[4 * N], p[4 * N];
void bf() {
  queue<int> q;
  int i;
  for (i = S; i <= D; ++i) {
    fol[i] = 0;
    dist[i] = inf;
    p[i] = -1;
  }
  fol[S] = 1;
  dist[S] = 0;
  q.push(S);
  while (!q.empty()) {
    int el = q.front();
    q.pop();
    for (vector<int>::iterator it = v[el].begin(); it != v[el].end(); ++it)
      if (cap[el][*it] - flux[el][*it] > 0 &&
          dist[*it] > dist[el] + cost[el][*it]) {
        dist[*it] = dist[el] + cost[el][*it];
        p[*it] = el;
        if (!fol[*it]) q.push(*it);
      }
  }
  if (dist[D] != inf) {
    drum = 1;
    int smin = inf;
    for (i = D; i != S; i = p[i])
      smin = min(smin, cap[p[i]][i] - flux[p[i]][i]);
    for (i = D; i != S; i = p[i]) {
      flux[p[i]][i] += smin;
      flux[i][p[i]] -= smin;
    }
    costmin += smin * dist[D];
  }
}
inline int bits(int nr) {
  int rez = 0;
  while (nr) {
    if (nr & 1) ++rez;
    nr /= 2;
  }
  return rez;
}
void cup() {
  drum = 1;
  int nr = 0;
  while (drum) {
    drum = 0;
    ++nr;
    bf();
  }
}
int main() {
  int i, j, nr[N];
  cin >> n >> m;
  for (j = 1; j <= m; ++j) {
    v[S].push_back(j + 260);
    v[j + 260].push_back(S);
    cap[S][j + 260] = 1;
  }
  for (i = 1; i <= n; ++i) {
    cin >> x[i];
    v[S].push_back(i);
    v[i].push_back(S);
    cap[S][i] = 1;
    v[i + 300].push_back(D);
    v[D].push_back(i + 300);
    cap[i + 300][D] = 1;
    for (j = 1; j <= m; ++j) {
      v[j + 260].push_back(i + 300);
      cap[j + 260][i + 300] = 1;
      cost[j + 260][i + 300] = bits(x[i]);
      cost[i + 300][j + 260] = -bits(x[i]);
      v[i + 300].push_back(j + 260);
    }
  }
  for (i = 1; i < n; ++i)
    for (j = i + 1; j <= n; ++j) {
      v[i].push_back(j + 300);
      cap[i][j + 300] = 1;
      cost[i][j + 300] = (x[i] == x[j] ? 0 : bits(x[j]));
      cost[j + 300][i] = -cost[i][j + 300];
      v[j + 300].push_back(i);
    }
  cup();
  st t;
  for (i = 1; i <= n; ++i) {
    for (j = 1; j <= 300; ++j)
      if (flux[j][i + 300]) {
        if (j > 260) {
          t.tip = 2;
          t.nr = j - 261;
          t.val = x[i];
          rez.push_back(t);
        }
        if (j <= 260 && x[j] != x[i]) {
          t.tip = 2;
          t.nr = nr[j];
          t.val = x[i];
          rez.push_back(t);
        }
        if (j <= 260 && x[j] == x[i]) t.nr = nr[j];
        t.tip = 1;
        nr[i] = t.nr;
        rez.push_back(t);
      }
  }
  cout << rez.size() << " " << costmin << "\n";
  for (i = 0; i < rez.size(); ++i) {
    if (rez[i].tip == 1) {
      cout << "print(" << (char)('a' + (char)rez[i].nr) << ")\n";
    } else {
      cout << (char)('a' + (char)rez[i].nr) << "=" << rez[i].val << "\n";
    }
  }
  return 0;
}