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 T {
  int i, v;
  T(int i = 0, int v = 0) : i(i), v(v) {}
};
bool operator<(T a, T b) { return a.v > b.v; }
int l, n, u[600], w[600], p[600], a[2 * 300010], c[2 * 300010], e[2 * 300010];
vector<int> m[600];
priority_queue<T> q;
void push(int i, int v, int j) {
  if (v < u[i]) {
    u[i] = v;
    p[i] = j;
    q.push(T(i, v));
  }
}
bool bfs(int b, int s) {
  int i, v, j, k;
  for (fill(u, u + n, 1000000000), push(b, 0, -1); !q.empty();) {
    i = q.top().i;
    v = q.top().v;
    q.pop();
    if (v == u[i])
      for (j = 0; j < m[i].size(); j++)
        if (a[k = m[i][j]]) push(e[k], v + c[k] + w[i] - w[e[k]], k);
  }
  return u[s] < 1000000000;
}
int mcmf(int b, int s) {
  int i, j, f;
  for (fill(w, w + n, 0), f = 0; bfs(b, s);) {
    for (j = 1000000000, i = s; i != b; j = min(j, a[p[i]]), i = e[p[i] ^ 1])
      ;
    for (i = s; i != b;
         a[p[i]] -= j, a[p[i] ^ 1] += j, f += c[p[i]] * j, i = e[p[i] ^ 1])
      ;
    for (i = 0; i < n; w[i] += ((u[i] - 1000000000) >> 31) & u[i], i++)
      ;
  }
  return f;
}
void add(int i, int j, int v, int p) {
  e[l] = j;
  a[l] = v;
  c[l] = p;
  m[i].push_back(l++);
  e[l] = i;
  a[l] = 0;
  c[l] = -p;
  m[j].push_back(l++);
}
int count(int x) {
  int r = 0;
  for (; x; r += x & 1, x >>= 1)
    ;
  return r;
}
int main() {
  int k, h, i, j, t, x[600], f[600], u[26];
  scanf("%d%d", &k, &h);
  for (i = 0; i < k; scanf("%d", &x[i]), i++)
    ;
  for (i = 0; i < k; i++) {
    f[i] = -1;
    for (j = i + 1; j < k && x[j] != x[i]; j++)
      ;
    if (j < k) {
      if (j == i + 1)
        f[i] = -2;
      else {
        f[i] = l;
        add(i + 1, j, 1, -count(x[i]));
      }
    }
  }
  for (i = 0; i < k; add(i, i + 1, h - 1, 0), i++)
    ;
  n = k + 1;
  mcmf(0, k);
  map<int, int> s;
  vector<string> r;
  char g[100];
  for (i = 0; i < h; u[i] = 0, i++)
    ;
  t = 0;
  for (i = 0; i < k; i++) {
    if (s.find(x[i]) == s.end()) {
      for (j = 0; j < h && u[j]; j++)
        ;
      u[j] = 1;
      s[x[i]] = j;
      sprintf(g, "%c=%d", 'a' + j, x[i]);
      r.push_back(g);
      t += count(x[i]);
    }
    sprintf(g, "print(%c)", 'a' + s[x[i]]);
    r.push_back(g);
    if (f[i] == -1 || (f[i] != -2 && a[f[i]])) {
      u[s[x[i]]] = 0;
      s.erase(x[i]);
    }
  }
  printf("%d %d\n", r.size(), t);
  for (i = 0; i < r.size(); printf("%s\n", r[i].c_str()), i++)
    ;
  return 0;
}