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 inf = 1e9;
const int maxm = 111111;
const int maxn = 8888;
int node, src, dest, tot;
int ver[maxm], flow[maxm], cost[maxm], nex[maxm];
int head[maxn], dis[maxn], p[maxn], q[maxn], vis[maxn];
void prepare(int _node, int _src, int _dest) {
  node = _node, src = _src, dest = _dest;
  for (int i = 0; i < node; i++) head[i] = -1, vis[i] = 0;
  tot = 0;
}
void addedge(int u, int v, int f, int c) {
  ver[tot] = v, flow[tot] = f, cost[tot] = c, nex[tot] = head[u],
  head[u] = tot++;
  ver[tot] = u, flow[tot] = 0, cost[tot] = -c, nex[tot] = head[v],
  head[v] = tot++;
}
bool spfa() {
  int i, u, v, l, r = 0, tmp;
  for (i = 0; i < node; ++i) dis[i] = inf;
  dis[q[r++] = src] = 0;
  p[src] = p[dest] = -1;
  for (l = 0; l != r; (++l >= maxn) ? l = 0 : l)
    for (i = head[u = q[l]], vis[u] = 0; i >= 0; i = nex[i])
      if (flow[i] && dis[v = ver[i]] > (tmp = dis[u] + cost[i])) {
        dis[v] = tmp;
        p[v] = i ^ 1;
        if (vis[v]) continue;
        vis[q[r++] = v] = 1;
        if (r >= maxn) r = 0;
      }
  return p[dest] > -1;
}
int SpfaFlow() {
  int i, ret = 0, delta;
  while (spfa()) {
    for (i = p[dest], delta = inf; i >= 0; i = p[ver[i]])
      if (flow[i ^ 1] < delta) delta = flow[i ^ 1];
    for (i = p[dest]; i >= 0; i = p[ver[i]])
      flow[i] += delta, flow[i ^ 1] -= delta;
    ret += delta * dis[dest];
  }
  return ret;
}
int a[maxn];
int hf[maxn];
map<int, int> mp;
int aans[maxn];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    a[i] = x;
    while (x) {
      if (x & 1) hf[i]++;
      x /= 2;
    }
  }
  src = 0, dest = 2 * n + m + 1;
  prepare(2 * n + m + 2, src, dest);
  for (int i = 1; i <= n; i++) {
    addedge(src, i, 1, 0);
    addedge(i + n, dest, 1, 0);
  }
  for (int i = 1; i <= m; i++) {
    addedge(src, 2 * n + i, 1, 0);
  }
  int x = 0;
  for (int i = 1; i <= n; i++) {
    if (mp[a[i]] == 0) {
      addedge(2 * n + (++x), i + n, 1, hf[i]);
      mp[a[i]] = 1;
      if (x == m) break;
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (a[i] == a[j])
        addedge(i, j + n, 1, 0);
      else
        addedge(i, j + n, 1, hf[j]);
    }
  }
  int ans = SpfaFlow();
  int ans1 = n;
  for (int i = n + 1; i <= n + n; i++) {
    for (int j = head[i]; j != -1; j = nex[j]) {
      int v = ver[j];
      if (cost[j] != 0 && flow[j] != 0) {
        ans1++;
        break;
      }
    }
  }
  printf("%d %d\n", ans1, ans);
  for (int i = n + 1; i <= n + n; i++) {
    for (int j = head[i]; j != -1; j = nex[j]) {
      int v = ver[j];
      if (flow[j] != 0) {
        int flag = 1;
        if (cost[j] == 0) {
          flag = 0;
        }
        if (v < dest && v > 2 * n) {
          printf("%c=%d\n", 'a' - 1 + v - 2 * n, a[i - n]);
          printf("print(%c)\n", 'a' - 1 + v - 2 * n);
          aans[v - 2 * n] = a[i - n];
        } else {
          for (int k = 1; k <= m; k++) {
            if (aans[k] == a[v]) {
              if (flag) {
                printf("%c=%d\n", 'a' - 1 + k, a[i - n]);
              }
              printf("print(%c)\n", 'a' - 1 + k);
              aans[k] = a[i - n];
              break;
            }
          }
        }
        break;
      }
    }
  }
  return 0;
}