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>
int bitcnt(int b) { return b == 0 ? 0 : bitcnt(b & b - 1) + 1; }
int oo[1 + (1 + 250 + (250 * (250 - 1) / 2) + 250) * 2],
    oh[1 + (1 + 250 + (250 * (250 - 1) / 2) + 250) * 2];
int link(int o, int h) {
  static int _ = 1;
  oo[_] = o, oh[_] = h;
  return _++;
}
int ii[(1 + 250 + (250 * (250 - 1) / 2) + 250)],
    jj[(1 + 250 + (250 * (250 - 1) / 2) + 250)],
    cc[(1 + 250 + (250 * (250 - 1) / 2) + 250) * 2],
    ww[(1 + 250 + (250 * (250 - 1) / 2) + 250)],
    ww_[(1 + 250 + (250 * (250 - 1) / 2) + 250)], m_;
int ae[(1 + 250 + 250 + 1)], dd[(1 + 250 + 250 + 1)], kk[(1 + 250 + 250 + 1)],
    ff[(1 + 250 + 250 + 1)], n_;
int pq[(1 + 250 + 250 + 1) * 2], iq[(1 + 250 + 250 + 1)], cnt;
void link_(int i, int j, int c, int w) {
  int h = m_++;
  ii[h] = i, jj[h] = j, cc[h << 1] = c, ww[h] = w;
  ae[i] = link(ae[i], h << 1);
  ae[j] = link(ae[j], h << 1 | 1);
}
int less(int u, int v) {
  return dd[u] < dd[v] || dd[u] == dd[v] && kk[u] < kk[v];
}
int i2(int i) {
  return (i *= 2) > cnt ? 0 : i < cnt && less(pq[i + 1], pq[i]) ? i + 1 : i;
}
void pq_up(int u) {
  int i, j, v;
  for (i = iq[u]; (j = i / 2) && less(u, v = pq[j]); i = j) pq[iq[v] = i] = v;
  pq[iq[u] = i] = u;
}
void pq_dn(int u) {
  int i, j, v;
  for (i = iq[u]; (j = i2(i)) && less(v = pq[j], u); i = j) pq[iq[v] = i] = v;
  pq[iq[u] = i] = u;
}
void pq_add_last(int u) { pq[iq[u] = ++cnt] = u; }
int pq_remove_first() {
  int u = pq[1], v = pq[cnt--];
  if (v != u) iq[v] = 1, pq_dn(v);
  iq[u] = 0;
  return u;
}
int dijkstra(int s, int t) {
  memset(dd, 0x3f, n_ * sizeof *dd);
  dd[s] = 0, kk[s] = 0, pq_add_last(s);
  while (cnt) {
    int i, k, o;
    i = pq_remove_first(), k = kk[i] + 1;
    for (o = ae[i]; o; o = oo[o]) {
      int h_ = oh[o];
      if (cc[h_]) {
        int h = h_ >> 1, j = i ^ ii[h] ^ jj[h],
            d = dd[i] + ((h_ & 1) == 0 ? ww_[h] : -ww_[h]);
        if (dd[j] > d || dd[j] == d && kk[j] > k) {
          if (dd[j] == 0x3f3f3f3f) pq_add_last(j);
          dd[j] = d, kk[j] = k, ff[j] = h_, pq_up(j);
        }
      }
    }
  }
  return dd[t] != 0x3f3f3f3f;
}
int cost;
int trace(int s, int t, int must) {
  int i, w;
  w = 0;
  for (i = t; i != s;) {
    int h_ = ff[i], h = h_ >> 1;
    w += (h_ & 1) == 0 ? ww[h] : -ww[h];
    i ^= ii[h] ^ jj[h];
  }
  if (w >= 0 && !must) return 0;
  cost += w;
  for (i = t; i != s;) {
    int h_ = ff[i], h = h_ >> 1;
    cc[h_]--, cc[h_ ^ 1]++;
    i ^= ii[h] ^ jj[h];
  }
  return 1;
}
void edmonds_karp(int s, int t, int f) {
  memcpy(ww_, ww, m_ * sizeof *ww);
  cost = 0;
  while (dijkstra(s, t)) {
    int h;
    if (!trace(s, t, f-- > 0)) break;
    for (h = 0; h < m_; h++) {
      int i = ii[h], j = jj[h];
      if (dd[i] != 0x3f3f3f3f && dd[j] != 0x3f3f3f3f) ww_[h] += dd[i] - dd[j];
    }
  }
}
int main() {
  static char vv[250];
  static int aa[250], pp[250];
  int n, m, h, i, j, s, t, len, a;
  scanf("%d%d", &n, &m);
  for (i = 0; i < n; i++) scanf("%d", &aa[i]);
  n_ = 1 + n + n + 1, s = 0, t = n_ - 1;
  for (i = 0; i < n; i++) link_(s, 1 + i, 1, 0);
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++)
      link_(1 + i, 1 + n + j, 1, aa[i] == aa[j] ? -bitcnt(aa[i]) : 0);
  for (j = 0; j < n; j++) link_(1 + n + j, t, 1, 0);
  edmonds_karp(s, t, n - m);
  for (i = 0; i < n; i++) cost += bitcnt(aa[i]);
  memset(pp, -1, n * sizeof *pp);
  for (h = 0; h < m_; h++)
    if (cc[h << 1 | 1]) {
      i = ii[h] - 1, j = jj[h] - 1 - n;
      if (i >= 0 && i < n && j >= 0 && j < n) pp[j] = i;
    }
  for (i = 0, a = 0; i < n; i++) vv[i] = pp[i] == -1 ? a++ + 'a' : vv[pp[i]];
  len = n;
  for (i = 0; i < n; i++)
    if (pp[i] == -1 || aa[i] != aa[pp[i]]) len++;
  printf("%d %d\n", len, cost);
  for (i = 0; i < n; i++) {
    if (pp[i] == -1 || aa[i] != aa[pp[i]]) printf("%c=%d\n", vv[i], aa[i]);
    printf("print(%c)\n", vv[i]);
  }
  return 0;
}