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)
#include <bits/stdc++.h>
using namespace std;
struct min_cost_flow_edge {
  long long int to, cap, cost, rev;
};
vector<min_cost_flow_edge> MIN_COST_FLOW_E[600];
long long int min_cost_flow_num_v;
void min_cost_flow_init() {
  min_cost_flow_num_v = 0;
  for (long long int i = 0; i < ((long long int)(600)); ++i)
    MIN_COST_FLOW_E[i].clear();
}
void min_cost_flow_add_edge(long long int from, long long int to,
                            long long int cap, long long int cost) {
  min_cost_flow_edge e0 = {to, cap, cost,
                           ((long long int)(MIN_COST_FLOW_E[to]).size())};
  min_cost_flow_edge e1 = {from, 0, -cost,
                           ((long long int)(MIN_COST_FLOW_E[from]).size())};
  MIN_COST_FLOW_E[from].push_back(e0);
  MIN_COST_FLOW_E[to].push_back(e1);
  min_cost_flow_num_v = max(min_cost_flow_num_v, from + 1);
  min_cost_flow_num_v = max(min_cost_flow_num_v, to + 1);
}
long long int min_cost_flow(long long int s, long long int g, long long int f) {
  long long int COST[600];
  long long int prev[600];
  long long int pree[600];
  long long int res = 0;
  while (f > 0) {
    for (long long int i = 0; i < ((long long int)(600)); ++i)
      COST[i] = (1ll << (long long int)(62));
    COST[s] = 0;
    bool updated = true;
    while (updated) {
      updated = false;
      for (long long int v = 0; v < ((long long int)(min_cost_flow_num_v));
           ++v) {
        if (COST[v] == (1ll << (long long int)(62))) continue;
        for (long long int i = 0;
             i <
             ((long long int)(((long long int)(MIN_COST_FLOW_E[v]).size())));
             ++i) {
          min_cost_flow_edge &e = MIN_COST_FLOW_E[v][i];
          if (e.cap > 0 && COST[e.to] > COST[v] + e.cost) {
            COST[e.to] = COST[v] + e.cost;
            prev[e.to] = v;
            pree[e.to] = i;
            updated = true;
          }
        }
      }
    }
    if (COST[g] == (1ll << (long long int)(62))) return -1;
    long long int tmp = f;
    for (long long int v = g; v != s; v = prev[v]) {
      tmp = min(tmp, MIN_COST_FLOW_E[prev[v]][pree[v]].cap);
    }
    f -= tmp;
    res += tmp * COST[g];
    for (long long int v = g; v != s; v = prev[v]) {
      min_cost_flow_edge &e = MIN_COST_FLOW_E[prev[v]][pree[v]];
      e.cap -= tmp;
      MIN_COST_FLOW_E[v][e.rev].cap += tmp;
    }
  }
  return res;
}
int main() {
  min_cost_flow_init();
  long long int n, k, a[600];
  cin >> n >> k;
  for (long long int i = 0; i < ((long long int)(n)); ++i) cin >> a[i];
  long long int source = n * 2;
  long long int sink = n * 2 + 1;
  for (long long int i = 0; i < ((long long int)(n)); ++i)
    for (long long int j = i - 1; 0 <= j; j--)
      if (a[i] == a[j]) {
        min_cost_flow_add_edge(j * 2 + 1, i * 2, 1,
                               -__builtin_popcountll(a[i]));
        break;
      }
  for (long long int i = 0; i < ((long long int)(n)); ++i)
    min_cost_flow_add_edge(i * 2, i * 2 + 1, 1, -(1ll << (long long int)(10)));
  for (long long int i = 0; i < ((long long int)(n)); ++i)
    min_cost_flow_add_edge(i * 2, i * 2 + 1, (1ll << (long long int)(10)), 0);
  for (long long int i = 0; i < ((long long int)(n - 1)); ++i)
    min_cost_flow_add_edge(i * 2 + 1, i * 2 + 2, (1ll << (long long int)(10)),
                           0);
  min_cost_flow_add_edge(source, 0, (1ll << (long long int)(10)), 0);
  min_cost_flow_add_edge(2 * n - 1, sink, (1ll << (long long int)(10)), 0);
  long long int res = min_cost_flow(source, sink, k);
  long long int sum = 0;
  for (long long int i = 0; i < ((long long int)(n)); ++i)
    sum += __builtin_popcountll(a[i]);
  vector<string> ans;
  long long int allocate[600];
  memset(allocate, -1, sizeof(allocate));
  long long int linked[600];
  memset(linked, 0, sizeof(linked));
  for (long long int i = 0; i < ((long long int)(source)); ++i)
    for (long long int j = 0;
         j < ((long long int)(((long long int)(MIN_COST_FLOW_E[i]).size())));
         ++j) {
      long long int to = MIN_COST_FLOW_E[i][j].to;
      if (i < to) continue;
      if (MIN_COST_FLOW_E[i][j].cap == 0) continue;
      if (MIN_COST_FLOW_E[i][j].cost == 0) continue;
      linked[to] = true;
    }
  for (long long int i = 0; i < ((long long int)(k)); ++i) {
    for (long long int to, pos = 2 * n - 1; pos != source; pos = to) {
      for (long long int j = 0;
           j <
           ((long long int)(((long long int)(MIN_COST_FLOW_E[pos]).size())));
           ++j) {
        to = MIN_COST_FLOW_E[pos][j].to;
        long long int cost = MIN_COST_FLOW_E[pos][j].cost;
        if (to != source && pos < to) continue;
        if (linked[pos] && cost != 0) continue;
        if (MIN_COST_FLOW_E[pos][j].cap == 0) continue;
        MIN_COST_FLOW_E[pos][j].cap--;
        if (cost != 0) linked[to] = 0;
        if (to % 2 == 0 && cost != 0) allocate[to / 2] = i;
        if (MIN_COST_FLOW_E[pos][j].cost == 0) break;
        if (MIN_COST_FLOW_E[pos][j].cost == (1ll << (long long int)(10))) break;
        allocate[pos / 2] = -100 - to / 2;
        break;
      }
    }
  }
  for (long long int i = 0; i < ((long long int)(n)); ++i) {
    stringstream ss;
    ss << a[i];
    if (0 <= allocate[i]) {
      ans.push_back(string(1, 'a' + allocate[i]) + "=" + ss.str());
      ans.push_back("print(" + string(1, 'a' + allocate[i]) + ")");
    } else {
      long long int num = -allocate[i] - 100;
      allocate[i] = allocate[num];
      ans.push_back("print(" + string(1, 'a' + allocate[i]) + ")");
    }
  }
  cout << ((long long int)(ans).size()) << " "
       << sum + res + (1ll << (long long int)(10)) * n << endl;
  for (long long int i = 0;
       i < ((long long int)(((long long int)(ans).size()))); ++i)
    cout << ans[i] << endl;
}
