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;
inline int read() {
  static char ch;
  bool sgn = false;
  while (ch = getchar(), ch < '0' || ch > '9')
    if (ch == '-') sgn = true;
  int res = ch - 48;
  while (ch = getchar(), ch >= '0' && ch <= '9') res = res * 10 + ch - 48;
  return sgn ? -res : res;
}
const int INF = 1 << 30;
const int N = 300005;
int m, n, k, cnt, cost, S, T, cc[N], c[N], pre[N], prd[N], tot;
bool bo[N];
vector<int> Eid[N];
struct Edge {
  int c, w, v;
} E[N];
void AddEdge(int x, int y, int c, int w) {
  E[++cnt].v = y;
  E[cnt].c = c;
  E[cnt].w = w;
  Eid[x].push_back(cnt);
  E[++cnt].v = x;
  E[cnt].c = -c;
  E[cnt].w = 0;
  Eid[y].push_back(cnt);
}
bool spfa() {
  static int Q[N * 2];
  int ql, qr;
  Q[ql = qr = 0] = S;
  fill(c, c + T + 1, INF);
  cc[T] = 0;
  cc[S] = INF;
  c[S] = 0;
  while (ql <= qr) {
    int x = Q[ql++];
    bo[x] = 0;
    for (int i = 0; i < Eid[x].size(); i++) {
      const Edge &e = E[Eid[x][i]];
      if (e.w && e.c + c[x] < c[e.v]) {
        if (!bo[e.v]) Q[++qr] = e.v;
        bo[e.v] = 1;
        c[e.v] = e.c + c[x];
        cc[e.v] = min(e.w, cc[x]);
        pre[e.v] = x;
        prd[e.v] = Eid[x][i];
      }
    }
  }
  return cc[T] > 0;
}
int MaxFlow() {
  cost = 0;
  while (spfa()) {
    int k = T;
    while (k != S) {
      E[prd[k]].w -= cc[T];
      E[prd[k] ^ 1].w += cc[T];
      k = pre[k];
    }
    cost += cc[T] * c[T];
  }
  return cost;
}
int cal(int x) {
  int res = 0;
  while (x) res += x & 1, x >>= 1;
  return res;
}
int a[300], ans[300], fir[300], ans0;
string s[300];
int main() {
  cnt = -1;
  n = read();
  m = read();
  T = n + n + m + 1;
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (a[i] == a[j])
        AddEdge(i, j + n, 0, 1);
      else
        AddEdge(i, j + n, cal(a[j]), 1);
  for (int i = 1; i <= n; i++) AddEdge(S, i, 0, 1), AddEdge(i + n, T, 0, 1);
  for (int i = 2 * n + 1; i < T; i++) AddEdge(S, i, 0, 1);
  for (int i = 2 * n + 1; i < T; i++)
    for (int j = n + 1; j <= 2 * n; j++) AddEdge(i, j, cal(a[j - n]), 1);
  MaxFlow();
  for (int i = 2 * n + 1; i < T; i++) {
    for (int j = Eid[i].size() - 1; j >= 0; j--)
      if (E[Eid[i][j]].w == 0 && E[Eid[i][j]].v > n)
        ans[E[Eid[i][j]].v - n] = i - 2 * n - 1, fir[E[Eid[i][j]].v - n] = 1,
                             ans0++;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = Eid[i].size() - 1; j >= 0; j--)
      if (E[Eid[i][j]].w == 0 && E[Eid[i][j]].v > n &&
          (a[E[Eid[i][j]].v - n]) != (a[i]))
        ans0++;
  }
  cout << ans0 + n << " " << cost << endl;
  for (int i = 1; i <= n; i++) {
    if (fir[i]) printf("%c=%d\n", 'a' + ans[i], a[i]);
    printf("print(%c)\n", 'a' + ans[i]);
    for (int j = Eid[i].size() - 1; j >= 0; j--)
      if (E[Eid[i][j]].w == 0 && E[Eid[i][j]].v > n &&
          (a[E[Eid[i][j]].v - n]) != (a[i]))
        ans[E[Eid[i][j]].v - n] = ans[i], fir[E[Eid[i][j]].v - n] = 1;
      else if (E[Eid[i][j]].w == 0 && E[Eid[i][j]].v > n &&
               (a[E[Eid[i][j]].v - n]) == (a[i]))
        ans[E[Eid[i][j]].v - n] = ans[i];
  }
}