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>
int n, m;
int a[501];
int b[501];
int head[2001], end[400001], cost[400001], next[400001], tp = -1;
int dis[2001], ans, len[400001], flow, old[2001];
int p[2001], pre[2001];
int q[100001], hh = 1, tt = 0;
int iq[2001];
const int inf = 1 << 30;
int cnt;
inline unsigned ppcnt(unsigned x) {
  x -= ((x & 0xaaaaaaaau) >> 1);
  x = ((x & 0xccccccccu) >> 2) + (x & 0x33333333u);
  x = ((x >> 4) + x) & 0x0f0f0f0fu;
  x = (x * 0x01010101u) >> 24;
  return x;
}
inline void add(int b, int e, int l, int c) {
  next[++tp] = head[b];
  head[b] = tp;
  end[tp] = e;
  len[tp] = l;
  cost[tp] = c;
  next[++tp] = head[e];
  head[e] = tp;
  end[tp] = b;
  len[tp] = 0;
  cost[tp] = -c;
}
int bfs(int s, int t, int b, int e) {
  int i, j, k;
  dis[s] = 0;
  pre[s] = -1;
  for (i = b; i <= e; i++)
    if (i != s) dis[i] = inf;
  hh = 1;
  tt = 0;
  q[++tt] = s;
  iq[s] = 1;
  while (hh <= tt) {
    for (i = head[q[hh]]; i >= 0; i = next[i])
      if (len[i] > 0 && dis[end[i]] > dis[q[hh]] + cost[i]) {
        dis[end[i]] = dis[q[hh]] + cost[i];
        pre[end[i]] = q[hh];
        p[end[i]] = i;
        if (!iq[end[i]]) {
          q[++tt] = end[i];
          iq[end[i]] = 1;
        }
      }
    iq[q[hh]] = 0;
    hh++;
  }
  return dis[t] < inf;
}
int ek_dfs(int s, int t) {
  int i;
  flow = inf;
  for (i = t; pre[i] != -1; i = pre[i]) {
    if (len[p[i]] < flow) flow = len[p[i]];
  }
  for (i = t; pre[i] != -1; i = pre[i]) {
    len[p[i]] -= flow;
    len[p[i] ^ 1] += flow;
    ans += flow * cost[p[i]];
  }
  return flow;
}
void ek(int s, int t, int b, int e) {
  while (bfs(s, t, b, e)) ek_dfs(s, t);
}
int main() {
  int i, j, k;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(head, -1, sizeof(head));
  for (i = 1; i <= n; i++) {
    for (j = i + 1; j <= n; j++)
      add(i, n + m + j, 1, a[i] == a[j] ? 0 : ppcnt(a[j]));
  }
  for (i = 1; i <= m; i++)
    for (j = 1; j <= n; j++) add(n + i, n + m + j, 1, ppcnt(a[j]));
  for (i = 1; i <= n + m; i++) add(0, i, 1, 0);
  for (i = n + m + 1; i <= n + n + m; i++) add(i, n + n + m + 1, 1, 0);
  ek(0, n + m + n + 1, 0, n + m + n + 1);
  for (i = n + m + 1; i <= n + m + n; i++) {
    for (j = head[i]; j >= 0; j = next[j])
      if (len[j] == 1) {
        if (end[j] > n || end[j] <= n && a[end[j]] != a[i - n - m]) cnt++;
        break;
      }
    cnt++;
  }
  printf("%d %d\n", cnt, ans);
  for (i = n + m + 1; i <= n + m + n; i++) {
    for (j = head[i]; j >= 0; j = next[j])
      if (len[j] == 1) {
        if (end[j] > n) {
          b[i - n - m] = end[j] - n;
          printf("%c=%d\n", (char)b[i - n - m] + 'a' - 1, a[i - n - m]);
        } else {
          b[i - n - m] = b[end[j]];
          if (a[end[j]] != a[i - n - m])
            printf("%c=%d\n", (char)b[i - n - m] + 'a' - 1, a[i - n - m]);
        }
        break;
      }
    printf("print(%c)\n", char(b[i - n - m] + 'a' - 1));
  }
  return 0;
}