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>
const long double PI = acos(-1);
const long double eps = 0.0000000001;
const long long INF = 0x3fffffffffffffff;
long long n, m, a[255], inid[255], outid[255], endid[255], lst[255], s, t, S, T,
    head[5005], ncnt, ecnt, cost, from[5005];
long long Cost[5005], Flow[5005];
bool in[5005];
std::map<long long, long long> MAP;
std::vector<std::pair<bool, std::pair<long long, long long>>> ans;
struct edge {
  long long n, t, cost, flow;
} e[5005];
void add_edge(long long F, long long T, long long COST, long long FLOW) {
  e[ecnt] = {head[F], T, COST, FLOW};
  head[F] = ecnt++;
}
void add_flow(long long F, long long T, long long COST, long long FLOW) {
  add_edge(F, T, +COST, FLOW);
  add_edge(T, F, -COST, 0);
}
long long pop_count(long long x) { return x ? pop_count(x & (x - 1)) + 1 : 0; }
void print() {
  for (long long i = 0; i < ncnt; ++i)
    for (long long j = head[i]; ~j; j = e[j].n)
      if (j % 2 == 0)
        std::cout << i << ' ' << e[j].t << ' ' << e[j].cost << ','
                  << (e[j].flow >= INF / 2 ? "INF" : std::to_string(e[j].flow))
                  << std::endl;
}
bool spfa(long long beg, long long end) {
  std::queue<long long> que;
  std::fill(Cost, Cost + ncnt, INF);
  std::fill(Flow, Flow + ncnt, 0);
  Cost[beg] = 0;
  Flow[beg] = INF;
  que.push(beg);
  while (!que.empty()) {
    long long now = que.front();
    in[now] = false;
    que.pop();
    for (long long i = head[now]; ~i; i = e[i].n) {
      if (e[i].flow && Cost[e[i].t] > Cost[now] + e[i].cost) {
        Cost[e[i].t] = Cost[now] + e[i].cost;
        Flow[e[i].t] = std::min(Flow[now], e[i].flow);
        from[e[i].t] = i;
        if (!in[e[i].t]) {
          in[e[i].t] = true;
          que.push(e[i].t);
        }
      }
    }
  }
  return Cost[end] != INF;
}
long long EK(long long beg, long long end) {
  long long res = 0;
  while (spfa(beg, end)) {
    res += Flow[end];
    long long now = end;
    while (now != beg) {
      e[from[now]].flow -= Flow[end];
      e[from[now] ^ 1].flow += Flow[end];
      cost += e[from[now]].cost * Flow[end];
      now = e[from[now] ^ 1].t;
    }
  }
  return res;
}
signed main() {
  std::ios::sync_with_stdio(false);
  memset(head, -1, sizeof(head));
  std::cin >> n >> m;
  S = ncnt++;
  T = ncnt++;
  s = ncnt++;
  t = ncnt++;
  endid[0] = ncnt++;
  for (long long i = 1; i <= n; ++i) {
    inid[i] = ncnt++;
    outid[i] = ncnt++;
    endid[i] = ncnt++;
    std::cin >> a[i];
    lst[i] = MAP[a[i]];
    MAP[a[i]] = i;
  }
  for (long long i = 1; i <= n; ++i) {
    add_flow(endid[i - 1], endid[i], 0, m);
    add_flow(inid[i], T, 0, 1);
    add_flow(S, outid[i], 0, 1);
    add_flow(inid[i], outid[i], 0, 1);
    add_flow(endid[i - 1], inid[i], pop_count(a[i]), 1);
    add_flow(outid[i], endid[i], 0, 1);
    if (lst[i]) add_flow(outid[lst[i]], inid[i], 0, m);
  }
  add_flow(s, endid[0], 0, m);
  add_flow(endid[n], t, 0, m);
  add_flow(t, s, 0, m);
  EK(S, T);
  EK(s, t);
  std::vector<long long> waiting;
  std::vector<long long> val(m);
  for (long long i = 0; i < m; ++i) waiting.push_back(i);
  for (long long i = 1; i <= n; ++i) {
    for (long long j = head[endid[i - 1]]; ~j; j = e[j].n) {
      if (inid[i] == e[j].t && !e[j].flow) {
        val[waiting.back()] = a[i];
        ans.push_back({false, {waiting.back(), i}});
        waiting.pop_back();
        break;
      }
    }
    for (long long j = 0; j < m; ++j) {
      if (val[j] == a[i]) {
        ans.push_back({true, {j, i}});
      }
    }
    for (long long j = head[outid[i]]; ~j; j = e[j].n) {
      if (endid[i] == e[j].t && !e[j].flow) {
        for (long long k = 0; k < m; ++k)
          if (val[k] == a[i]) {
            val[k] = 0;
            waiting.push_back(k);
            break;
          }
      }
    }
  }
  std::cout << ans.size() << ' ' << cost << std::endl;
  for (long long i = 0; i < ans.size(); ++i) {
    if (ans[i].first) {
      std::cout << "print(" << char(ans[i].second.first + 'a') << ')'
                << std::endl;
    } else {
      std::cout << char(ans[i].second.first + 'a') << '='
                << a[ans[i].second.second] << std::endl;
    }
  }
  return 0;
}