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 kInf = 0x3f3f3f3f;
const int kMaxN = 250, kMaxM = 26;
int n, m, seq[kMaxN], val[kMaxN];
int pos[kMaxN], pre[kMaxN];
vector<pair<int, int> > sol;
namespace flow {
const int kMaxV = kMaxN * 2 + 3,
          kMaxE = (kMaxN * 2 + (kMaxN - 1) * kMaxN / 2 + kMaxN + 1) * 2;
int sv, tv, cnt, begin[kMaxV], end[kMaxE], next[kMaxE], cap[kMaxE], cost[kMaxE];
int dis[kMaxV], pre[kMaxV];
bool inq[kMaxV];
queue<int> q;
int maxflow, mincost;
void Init(int s, int t) {
  sv = s, tv = t;
  cnt = 0, memset(begin, -1, sizeof(begin));
}
void AddEdge(int u, int v, int c, int w) {
  next[cnt] = begin[u];
  begin[u] = cnt;
  end[cnt] = v;
  cap[cnt] = c;
  cost[cnt++] = w;
}
void AddPair(int u, int v, int c, int w) {
  AddEdge(u, v, c, w);
  AddEdge(v, u, 0, -w);
}
bool Spfa() {
  memset(dis, 0x3f, sizeof(dis));
  dis[sv] = 0, inq[sv] = true, q.push(sv);
  while (q.size()) {
    int u = q.front();
    q.pop(), inq[u] = false;
    for (int now = begin[u], v; now != -1; now = next[now])
      if (cap[now] && dis[v = end[now]] > dis[u] + cost[now]) {
        dis[v] = dis[u] + cost[now];
        pre[v] = now;
        if (!inq[v]) inq[v] = true, q.push(v);
      }
  }
  return (dis[tv] != kInf);
}
void DoAug() {
  int flow = kInf;
  for (int i = tv; i != sv; i = end[pre[i] ^ 1]) flow = min(flow, cap[pre[i]]);
  for (int i = tv; i != sv; i = end[pre[i] ^ 1])
    cap[pre[i]] -= flow, cap[pre[i] ^ 1] += flow;
  maxflow += flow;
  mincost += flow * dis[tv];
}
int Mincost() {
  maxflow = 0, mincost = 0;
  while (Spfa()) {
    if (dis[tv] > 0) break;
    DoAug();
  }
  return mincost;
}
}  // namespace flow
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &seq[i]);
    val[i] = __builtin_popcount(seq[i]);
  }
  flow::Init(n * 2 + 1, n * 2 + 2);
  flow::AddPair(n * 2 + 1, n * 2, m, 0);
  for (int i = 0; i < n; ++i) {
    flow::AddPair(i, i + n, 1, -100000);
    flow::AddPair(n * 2, i, 1, val[i]);
    flow::AddPair(i + n, n * 2 + 2, 1, 0);
    for (int j = i + 1; j < n; ++j)
      flow::AddPair(i + n, j, 1, seq[i] == seq[j] ? 0 : val[j]);
  }
  int ans = flow::Mincost() + n * 100000;
  memset(pre, -1, sizeof(pre));
  memset(pos, -1, sizeof(pos));
  for (int i = 0, now = flow::begin[n * 2]; now != -1; now = flow::next[now])
    if (flow::end[now] != n * 2 + 1 && !flow::cap[now])
      pos[flow::end[now]] = i++;
  for (int i = 0; i < n; ++i) {
    if (pre[i] == -1 || seq[pre[i]] != seq[i])
      sol.push_back(make_pair(seq[i], pos[i]));
    sol.push_back(make_pair(0, pos[i]));
    for (int now = flow::begin[i + n]; now != -1; now = flow::next[now])
      if (flow::end[now] != i && flow::end[now] != n * 2 + 2 &&
          !flow::cap[now]) {
        pos[flow::end[now]] = pos[i];
        pre[flow::end[now]] = i;
        break;
      }
  }
  printf("%d %d\n", sol.size(), ans);
  for (int i = 0; i < int(sol.size()); ++i) {
    assert(sol[i].second >= 0 && sol[i].second < m);
    if (sol[i].first == 0)
      printf("print(%c)\n", 'a' + sol[i].second);
    else
      printf("%c=%d\n", 'a' + sol[i].second, sol[i].first);
  }
  return 0;
}