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;
template <class T>
inline void gmin(T &a, T b) {
  if (a > b) a = b;
}
const int inf = 0x7f7f7f7f;
const int maxn = 500 + 20, maxe = maxn * maxn * 2 + 2;
struct arc {
  int e, c, v;
  arc *pre;
  arc() {}
  arc(int e, int c, int v, arc *pre) : e(e), c(c), v(v), pre(pre) {}
} * head[maxn], mem[maxe], *sp = mem;
inline void addarc(int x, int y, int z, int w) {
  head[x] = new (sp++) arc(y, z, w, head[x]);
  head[y] = new (sp++) arc(x, 0, -w, head[y]);
}
inline arc *rev(arc *p) { return mem + ((p - mem) ^ 1); }
queue<int> que;
int dist[maxn];
bool inq[maxn];
arc *edge[maxn];
bool spfa(int x, int y) {
  que.push(x);
  memset(dist, 0x7f, sizeof(dist));
  dist[x] = 0;
  while (!que.empty()) {
    x = que.front();
    que.pop();
    inq[x] = false;
    for (arc *p = head[x]; p; p = p->pre) {
      if (p->c > 0 && dist[x] + p->v < dist[p->e]) {
        dist[p->e] = dist[x] + p->v;
        edge[p->e] = p;
        if (!inq[p->e]) que.push(p->e), inq[p->e] = true;
      }
    }
  }
  return dist[y] != inf;
}
int s, t, s0;
bitset<32> v;
int aug() {
  int delta = inf;
  for (int i = t; i != s; i = rev(edge[i])->e) gmin(delta, edge[i]->c);
  for (int i = t; i != s; i = rev(edge[i])->e)
    edge[i]->c -= delta, rev(edge[i])->c += delta;
  return dist[t] * delta;
}
int costflow() {
  int cost = 0;
  while (spfa(s, t)) cost += aug();
  return cost;
}
map<int, int> number;
map<int, int> pre;
inline int pnt(int x) { return (x + 1) * 2; }
int n, m, a[maxn], lim = -1000000;
char c[maxn];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  s = 1;
  s0 = 2;
  t = pnt(n) + 1;
  for (int i = 1; i <= n; i++) {
    v = a[i];
    addarc(s0, pnt(i) - 1, 1, v.count());
    addarc(pnt(i), t, 1, 0);
    addarc(pnt(i) - 1, pnt(i), 1, lim);
  }
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++) {
      v = a[j];
      if (a[i] == a[j])
        addarc(pnt(i), pnt(j) - 1, 1, 0);
      else
        addarc(pnt(i), pnt(j) - 1, 1, v.count());
    }
  addarc(s, s0, m, 0);
  addarc(s0, t, inf, 0);
  int ans = 0, ans2 = 0;
  ans2 = costflow() - lim * n;
  char ne = 'a' - 1;
  for (int i = 1; i <= n; i++)
    for (arc *p = head[pnt(i) - 1]; p; p = p->pre)
      if (p->c == 1) {
        if (p->e == s0) {
          c[i] = ++ne;
          ans++;
        } else if (a[p->e / 2 - 1] != a[i]) {
          c[i] = c[p->e / 2 - 1];
          ans++;
        } else
          c[i] = c[p->e / 2 - 1];
        ans++;
      }
  cout << ans << ' ' << ans2 << endl;
  ne = 'a' - 1;
  for (int i = 1; i <= n; i++)
    for (arc *p = head[pnt(i) - 1]; p; p = p->pre)
      if (p->c == 1) {
        if (p->e == s0) {
          c[i] = ++ne;
          printf("%c=%d\n", c[i], a[i]);
          ans++;
        } else if (a[p->e / 2 - 1] != a[i]) {
          c[i] = c[p->e / 2 - 1];
          printf("%c=%d\n", c[i], a[i]);
          ans++;
        } else
          c[i] = c[p->e / 2 - 1];
        printf("print(%c)\n", c[i]);
        ans++;
      }
  return 0;
}