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;
struct st {
  int x;
  int ca;
  int co;
  int f;
};
struct pt {
  int x;
  int c;
  friend int operator<(pt a, pt b) { return a.c > b.c; }
};
st e[(560 * 560 * 2)];
int fr;
vector<vector<int> > v(560);
void adde(int x, int y, int ca, int co) {
  e[fr].x = y;
  e[fr].ca = ca;
  e[fr].co = co;
  e[fr].f = 0;
  v[x].push_back(fr);
  fr++;
  e[fr].x = x;
  e[fr].ca = ca;
  e[fr].co = -co;
  e[fr].f = ca;
  v[y].push_back(fr);
  fr++;
}
int a[560];
int d[560], p[560], w[560];
int bg, en;
int dfs(int cur) {
  if (cur == bg) {
    w[cur] = 0;
    return 0;
  }
  if (d[cur] != -1) {
    return w[cur];
  }
  int i, x, r, t;
  r = 1000000000;
  for (i = 0; i < v[cur].size(); i++) {
    x = v[cur][i];
    if (e[x].f > 0) {
      t = dfs(e[x].x) + e[x ^ 1].co;
      if (t < r) {
        r = t;
      }
    }
  }
  w[cur] = r;
  d[cur] = 1;
  return r;
}
int bc(int x) {
  int r = 0;
  while (x > 0) {
    x &= (x - 1);
    r++;
  }
  return r;
}
priority_queue<pt> q;
int i, j, k, n, m, x, y, z, t, f, res, r;
pt p1, p2;
int main() {
  cin >> n >> m;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  bg = 2 * n;
  en = bg + 1;
  for (i = 0; i < n; i++) {
    adde(bg, 2 * i, 1, bc(a[i]));
    adde(2 * i + 1, en, 1, 0);
    adde(2 * i, 2 * i + 1, 1, -1 * 100000);
  }
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      if (a[i] == a[j]) {
        adde(2 * i + 1, 2 * j, 1, 0);
      } else {
        adde(2 * i + 1, 2 * j, 1, bc(a[j]));
      }
    }
  }
  memset(d, -1, sizeof(d));
  for (i = 0; i <= en; i++) {
    if (d[i] == -1) {
      dfs(i);
    }
  }
  f = 0;
  res = 1000000000;
  while (f < m) {
    for (i = 0; i <= en; i++) {
      d[i] = 1000000000;
    }
    p1.x = bg;
    p1.c = 0;
    d[p1.x] = p1.c;
    q.push(p1);
    while (!q.empty()) {
      p1 = q.top();
      q.pop();
      x = p1.x;
      for (i = 0; i < v[x].size(); i++) {
        z = v[x][i];
        if (e[z].f == e[z].ca) {
          continue;
        }
        y = e[z].x;
        t = d[x] + w[x] + e[z].co - w[y];
        if (t < d[y]) {
          d[y] = t;
          p[y] = z;
          p2.x = y;
          p2.c = t;
          q.push(p2);
        }
      }
    }
    if (d[en] >= 1000000000) {
      break;
    }
    x = en;
    while (x != bg) {
      z = p[x];
      e[z].f++;
      e[z ^ 1].f--;
      x = e[z ^ 1].x;
    }
    f++;
    t = 0;
    for (i = 0; i < fr; i += 2) {
      t += e[i].f * e[i].co;
    }
    if (t >= res) {
      x = en;
      while (x != bg) {
        z = p[x];
        e[z].f--;
        e[z ^ 1].f++;
        x = e[z ^ 1].x;
      }
      f--;
      break;
    }
    res = t;
    for (i = 0; i <= en; i++) {
      if (d[i] < 1000000000) {
        w[i] += d[i];
      }
    }
  }
  res %= 100000;
  res = 100000 + res;
  ;
  memset(p, -1, sizeof(p));
  memset(d, 0, sizeof(d));
  for (j = 0; j < f; j++) {
    x = bg;
    while (x != en) {
      p[x] = j;
      for (i = 0; i < v[x].size(); i++) {
        z = v[x][i];
        y = e[z].x;
        if (e[z].f > 0 && p[y] == -1) {
          if (e[z].co > 0 || x == bg) {
            d[y] = 1;
            r++;
          }
          e[z].f = 0;
          break;
        }
      }
      x = y;
    }
  }
  printf("%d %d\n", n + r, res);
  for (i = 0; i < 2 * n; i += 2) {
    if (d[i] == 1) {
      printf("%c=%d\n", p[i] + 'a', a[i / 2]);
    }
    printf("print(%c)\n", p[i] + 'a');
  }
  return 0;
}