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 N = 10100, M = 100100, TO = 10100, INF = 1000010000;
struct edge {
  int n, v, w, c;
} e[M];
int n, m, cu, cd, mxf, miw, S, T, S1, T1, cc, R, cop, fl = 1;
int a[N], b[N], c[N], pos[N], las[N], nx[N], dn[N], up[N], sa[N], U[N], D[N],
    co[N];
int hd[TO], di[TO], in[TO], vi[TO], bo[N], bg[N];
deque<int> q;
void add_(int u, int v, int w, int c) {
  e[++fl] = (edge){hd[u], v, w, c};
  hd[u] = fl;
}
void add(int u, int v, int w, int c) { add_(u, v, w, c), add_(v, u, -w, 0); }
int con(int x) {
  int ret = 0;
  while (x) ret += x & 1, x >>= 1;
  return ret;
}
bool SPFA() {
  for (int i = S; i <= T; i++) di[i] = INF, in[i] = 0;
  q.clear();
  q.push_back(T);
  di[T] = 0;
  while (q.size()) {
    int u = q.front();
    q.pop_front();
    in[u] = 0;
    for (int i = hd[u], v, w, c; v = e[i].v, w = e[i].w, c = e[i].c, i;
         i = e[i].n)
      if (e[i ^ 1].c && di[u] - w < di[v]) {
        di[v] = di[u] - w;
        if (!in[v]) {
          q.size() && di[v] < di[q.front()] ? q.push_front(v) : q.push_back(v);
          in[v] = 1;
        }
      }
  }
  return di[S] != INF;
}
int dfs(int u, int exp) {
  vi[u] = 1;
  if (u == T) return exp;
  int flw = 0;
  for (int i = hd[u], v, w, c; v = e[i].v, w = e[i].w, c = e[i].c, i;
       i = e[i].n)
    if (c && !vi[v] && di[u] - w == di[v]) {
      int tmp = dfs(v, min(c, exp));
      if (!tmp) continue;
      miw += w * tmp;
      flw += tmp;
      e[i ^ 1].c += tmp;
      exp -= tmp;
      e[i ^ 0].c -= tmp;
      if (!exp) break;
    }
  return flw;
}
void MCMF() {
  while (SPFA()) {
    vi[T] = 1;
    while (vi[T]) {
      for (int i = S; i <= T; i++) vi[i] = 0;
      mxf += dfs(S, INF);
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  S = 1, S1 = 2, T1 = 3 * n + 3, T = 3 * n + 4;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), b[i] = a[i];
  sort(b + 1, b + n + 1);
  R = unique(b + 1, b + n + 1) - b - 1;
  for (int i = 1; i <= n; i++)
    c[i] = con(a[i]), a[i] = lower_bound(b + 1, b + R + 1, a[i]) - b;
  for (int i = 1; i <= n; i++) {
    add(S, (2 + 0 * n + i), 0, 1);
    add((2 + 0 * n + i), (2 + 1 * n + i), 0, 1);
    up[i] = fl;
    if (pos[a[i]]) {
      add((2 + 0 * n + pos[a[i]]), (2 + 2 * n + i), 0, 1);
      sa[i] = fl, las[i] = pos[a[i]];
    }
    pos[a[i]] = i;
    if (i < n) {
      add((2 + 1 * n + i), (2 + 1 * n + i + 1), 0, n);
      add((2 + 1 * n + i), (2 + 2 * n + i + 1), c[i + 1], 1);
      dn[i + 1] = fl;
    }
    add((2 + 2 * n + i), T, 0, 1);
    add((2 + 0 * n + i), T1, 0, 1);
    add(S1, (2 + 2 * n + i), c[i], 1);
    bg[i] = fl;
  }
  add(T1, S1, 0, m);
  MCMF();
  for (int i = 2; i <= n; i++)
    if (e[sa[i]].c) nx[las[i]] = i;
  for (int i = 1; i <= n; i++)
    if (e[up[i]].c) U[++cu] = i;
  for (int i = 1; i <= n; i++)
    if (e[dn[i]].c) D[++cd] = i;
  for (int i = 1; i <= cu; i++) nx[U[i]] = D[i], bo[D[i]] = 1, cop++;
  for (int i = 1; i <= n; i++)
    if (e[bg[i]].c) co[i] = ++cc, bo[i] = 1, cop++;
  for (int i = 1; i <= n; i++)
    if (nx[i]) co[nx[i]] = co[i];
  printf("%d %d\n", cop + n, miw);
  for (int i = 1; i <= n; i++) {
    if (bo[i]) cout << char(co[i] - 1 + 'a') << '=' << b[a[i]] << '\n';
    cout << "print(" << char(co[i] - 1 + 'a') << ")\n";
  }
}