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 maxn = 255;
const int maxv = 505;
const int maxm = 80005;
const int LIM = 100000;
struct Tedge {
  int y, next, f, c;
  Tedge() {}
  Tedge(int _y, int _f, int _c, int _next) {
    y = _y;
    f = _f;
    c = _c;
    next = _next;
  }
} adj[maxm];
int fch[maxv], num[maxn], ord[maxn];
int n, ms, m, ret, tot, S, T;
inline int count(int x) {
  int ret = 0;
  while (x) ret += x & 1, x >>= 1;
  return ret;
}
void init() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", &num[i]);
}
void add_edge(int x, int y, int f, int c) {
  adj[ms] = Tedge(y, f, c, fch[x]);
  fch[x] = ms++;
}
void mkgraph() {
  memset(fch, -1, sizeof(fch));
  S = n + n;
  T = S + 1;
  ms = 0;
  for (int i = 0; i < n; i++) {
    add_edge(S, i, 1, count(num[i]));
    add_edge(i, S, 0, -count(num[i]));
    add_edge(n + i, T, 1, 0);
    add_edge(T, n + i, 0, 0);
    add_edge(i, n + i, 1, -LIM);
    add_edge(n + i, i, 0, LIM);
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      if (num[i] == num[j]) {
        add_edge(n + i, j, 1, 0);
        add_edge(j, n + i, 0, 0);
      } else {
        add_edge(n + i, j, 1, count(num[j]));
        add_edge(j, n + i, 0, -count(num[j]));
      }
}
bool vis[maxv];
int que[maxv], dis[maxv], id[maxv];
bool spfa() {
  for (int i = 0; i <= T; i++) vis[i] = 0, dis[i] = LIM;
  int head = 0, tail = 1;
  que[0] = S;
  vis[S] = true;
  dis[S] = 0;
  while (head != tail) {
    int u = que[head++];
    vis[u] = 0;
    if (head == maxv) head = 0;
    for (int i = fch[u]; i != -1; i = adj[i].next) {
      int v = adj[i].y;
      if (!adj[i].f || dis[v] <= dis[u] + adj[i].c) continue;
      dis[v] = dis[u] + adj[i].c;
      id[v] = i;
      if (!vis[v]) {
        vis[v] = true;
        que[tail] = v;
        if (dis[v] < dis[que[head]]) que[tail] = que[head], que[head] = v;
        tail++;
        if (tail == maxv) tail = 0;
      }
    }
  }
  if (dis[T] >= 0) return 0;
  int u = T;
  while (u != S) {
    adj[id[u]].f--;
    adj[id[u] ^ 1].f++;
    ret += adj[id[u]].c;
    u = adj[id[u] ^ 1].y;
  }
  return 1;
}
void work() {
  mkgraph();
  ret = n * LIM;
  for (int i = 0; i < m; i++)
    if (!spfa()) break;
  tot = 0;
  int cur = 0;
  for (int u = 0; u < n; u++)
    for (int i = fch[u]; i != -1; i = adj[i].next)
      if (adj[i].f && i) {
        int v = adj[i].y;
        if (v == S) {
          ord[u] = cur++;
          tot += 2;
        } else {
          v -= n;
          ord[u] = ord[v];
          if (num[v] == num[u])
            tot++;
          else
            tot += 2;
        }
      }
}
void print() {
  printf("%d %d\n", tot, ret);
  for (int u = 0; u < n; u++)
    for (int i = fch[u]; i != -1; i = adj[i].next)
      if (adj[i].f && i) {
        int v = adj[i].y;
        if (v == S || num[u] != num[v - n])
          printf("%c=%d\n", ord[u] + 'a', num[u]);
        printf("print(%c)\n", ord[u] + 'a');
      }
}
int main() {
  init();
  work();
  print();
  return 0;
}