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 kraw {
  int a, cap, cost;
};
int n, m;
const int INF = 1000000;
void Stworz(vector<vector<kraw> >& G) {
  for (int i = 1; i <= n; ++i) G[0].push_back({i, 0, 0});
  for (int i = 1; i <= n; ++i) {
    for (int j = n + 1; j <= 2 * n + m; ++j) G[i].push_back({j, 0, 0});
    G[i].push_back({0, 0, 0});
  }
  for (int i = n + 1; i <= 2 * n + m; ++i) {
    G[i].push_back({2 * n + m + 1, 0, 0});
    for (int j = 1; j <= n; ++j) G[i].push_back({j, 0, 0});
  }
  for (int i = n + 1; i <= 2 * n + m; ++i)
    G[2 * n + m + 1].push_back({i, 0, 0});
}
void MinCostMaxFlow(vector<vector<kraw> >& G) {
  while (true) {
    vector<int> odl(2 * n + m + 2, INF);
    vector<int> pop(2 * n + m + 2, -1);
    odl[0] = 0;
    for (int i = 0; i < 2 * n + m + 1; ++i) {
      bool bylo = false;
      for (int j = 0; j < 2 * n + m + 2; ++j) {
        for (int k = 0; k < G[j].size(); ++k) {
          if (odl[j] < INF && G[j][k].cap != 0 &&
              odl[j] + G[j][k].cost < odl[G[j][k].a]) {
            odl[G[j][k].a] = odl[j] + G[j][k].cost;
            pop[G[j][k].a] = j;
            bylo = true;
          }
        }
      }
      if (!bylo) break;
    }
    if (odl[2 * n + m + 1] == INF) break;
    vector<int> path;
    int akt = 2 * n + m + 1;
    while (akt != 0) {
      path.push_back(akt);
      akt = pop[akt];
    }
    path.push_back(0);
    reverse(path.begin(), path.end());
    int c = INF;
    for (int i = 0; i < (int)path.size() - 1; ++i)
      for (int j = 0; j < G[path[i]].size(); ++j)
        if (G[path[i]][j].a == path[i + 1]) c = min(c, G[path[i]][j].cap);
    for (int i = 0; i < (int)path.size() - 1; ++i) {
      for (int j = 0; j < G[path[i]].size(); ++j)
        if (G[path[i]][j].a == path[i + 1]) G[path[i]][j].cap -= c;
      for (int j = 0; j < G[path[i + 1]].size(); ++j)
        if (G[path[i + 1]][j].a == path[i]) G[path[i + 1]][j].cap += c;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  vector<vector<kraw> > G(2 * n + m + 2);
  Stworz(G);
  for (int i = 1; i <= n; ++i) G[0][i - 1].cap = 1;
  for (int i = 1; i <= n; ++i) {
    for (int j = n + 1; j <= n + m; ++j) {
      G[i][j - (n + 1)].cap = 1;
      G[i][j - (n + 1)].cost = __builtin_popcount(a[i - 1]);
      G[j][i].cost = -__builtin_popcount(a[i - 1]);
    }
    for (int j = n + m + 1; j <= 2 * n + m; ++j) {
      if (j - (n + m + 1) < i - 1) {
        G[i][j - (n + 1)].cap = 1;
        if (a[i - 1] != a[j - (n + m + 1)]) {
          G[i][j - (n + 1)].cost = __builtin_popcount(a[i - 1]);
          G[j][i].cost = -__builtin_popcount(a[i - 1]);
        }
      }
    }
  }
  for (int i = n + 1; i <= 2 * n + m; ++i) G[i][0].cap = 1;
  MinCostMaxFlow(G);
  int dl = 2 * n, cost = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < (int)G[i].size() - 1; ++j) {
      if (G[i][j].cap == 0 && (j < m || (j >= m && i - 1 > j - m))) {
        if (G[i][j].cost == 0) --dl;
        cost += G[i][j].cost;
      }
    }
  }
  cout << dl << " " << cost << endl;
  vector<int> zmi(n);
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < (int)G[i].size() - 1; ++j) {
      if (G[i][j].cap == 0 && (j < m || (j >= m && i - 1 > j - m))) {
        if (j < m) {
          cout << (char)('a' + j) << "=" << a[i - 1] << endl;
          zmi[i - 1] = j;
        } else {
          if (a[i - 1] != a[j - m])
            cout << (char)('a' + zmi[j - m]) << "=" << a[i - 1] << endl;
          zmi[i - 1] = zmi[j - m];
        }
        cout << "print(" << (char)('a' + zmi[i - 1]) << ")" << endl;
      }
    }
  }
  return 0;
}