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;
int n, m;
int st, sst, en;
int a[505], g[505], o[505];
int b[505 * 505], e[505 * 505], h[505 * 505], w[505 * 505], c[505 * 505],
    pre[505 * 505], p[505 * 505];
long long d[505 * 505];
queue<int> q;
long long ans;
int tot = 1;
char op[1005][105];
int get(int x) {
  int s = 0;
  while (x) {
    x &= (x - 1);
    s++;
  }
  return s;
}
int spfa() {
  for (int i = 0; i <= en; i++) {
    d[i] = 100000;
    p[i] = 0;
  }
  d[st] = 0;
  p[st] = 1;
  q.push(st);
  while (!q.empty()) {
    int k = q.front();
    q.pop();
    p[k] = 0;
    for (int go = h[k]; go; go = e[go])
      if (d[b[go]] > d[k] + w[go] && c[go]) {
        d[b[go]] = d[k] + w[go];
        pre[b[go]] = go;
        if (p[b[go]] == 0) {
          p[b[go]] = 1;
          q.push(b[go]);
        }
      }
  }
  if (d[en] < 100000) {
    long long flow = 100000;
    for (int go = en; go != st; go = b[pre[go] ^ 1])
      flow = min(flow, (long long)c[pre[go]]);
    if (flow * d[en] >= 0) return 0;
    ans += flow * d[en];
    for (int go = en; go != st; go = b[pre[go] ^ 1])
      c[pre[go]] -= flow, c[pre[go] ^ 1] += flow;
    return 1;
  }
  return 0;
}
void add(int x, int y, int z, int q) {
  b[++tot] = y;
  c[tot] = z;
  w[tot] = q;
  e[tot] = h[x];
  h[x] = tot;
  b[++tot] = x;
  c[tot] = 0;
  w[tot] = -q;
  e[tot] = h[y];
  h[y] = tot;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    g[i] = get(a[i]);
  }
  st = 2 * n;
  sst = st + 1;
  en = sst + 1;
  add(st, sst, m, 0);
  for (int i = 0; i < n; i++) {
    add(sst, i, 1, g[i]);
    add(i + n, en, 1, 0);
    add(i, i + n, 1, -100000);
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      if (a[i] == a[j])
        add(i + n, j, 1, 0);
      else
        add(i + n, j, 1, g[j]);
    }
  while (spfa())
    ;
  int now = 0, sum = 0;
  m = 0;
  for (int i = 0; i < n; i++) {
    for (int go = h[i]; go; go = e[go])
      if (c[go] == 1) {
        if (b[go] == sst) {
          o[i] = now++;
          sum += 2;
          sprintf(op[m++], "%c=%d\nprint(%c)\n", o[i] + 'a', a[i], o[i] + 'a');
        } else {
          o[i] = o[b[go] - n];
          if (w[go] != 0) {
            sum += 2;
            sprintf(op[m++], "%c=%d\nprint(%c)\n", o[i] + 'a', a[i],
                    o[i] + 'a');
          } else {
            sum++;
            sprintf(op[m++], "print(%c)\n", o[i] + 'a');
          }
        }
      }
  }
  printf("%d %I64d\n", sum, ans + n * 100000);
  for (int i = 0; i < m; i++) printf("%s", op[i]);
  return 0;
}