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 vis[30100];
int dist[30100];
int pre[30100];
int A[30100], value[30100];
int Flag1[30100], Flag2[500][500], tot, flag[30100], n, p[30100];
struct Edge {
  int u, v, c, cost, next;
} edge[1000100];
int head[30100], cnt;
int Cnt(int x) {
  int ans = 0;
  while (x) {
    ans++;
    x = x - (x & (-x));
  }
  return ans;
}
void init() {
  cnt = 0;
  memset(head, -1, sizeof(head));
}
void addedge(int u, int v, int c, int cost) {
  edge[cnt].u = u;
  edge[cnt].v = v;
  edge[cnt].cost = cost;
  edge[cnt].c = c;
  edge[cnt].next = head[u];
  head[u] = cnt++;
  edge[cnt].u = v;
  edge[cnt].v = u;
  edge[cnt].cost = -cost;
  edge[cnt].c = 0;
  edge[cnt].next = head[v];
  head[v] = cnt++;
}
bool spfa(int begin, int end) {
  int u, v;
  queue<int> q;
  for (int i = 0; i <= end + 2; i++) {
    pre[i] = -1;
    vis[i] = 0;
    dist[i] = 99999999;
  }
  vis[begin] = 1;
  dist[begin] = 0;
  q.push(begin);
  while (!q.empty()) {
    u = q.front();
    q.pop();
    vis[u] = 0;
    for (int i = head[u]; i != -1; i = edge[i].next) {
      if (edge[i].c > 0) {
        v = edge[i].v;
        if (dist[v] > dist[u] + edge[i].cost) {
          dist[v] = dist[u] + edge[i].cost;
          pre[v] = i;
          if (!vis[v]) {
            vis[v] = true;
            q.push(v);
          }
        }
      }
    }
  }
  return dist[end] != 99999999;
}
int MCMF(int begin, int end) {
  int ans = 0, flow;
  int flow_sum = 0;
  while (spfa(begin, end)) {
    flow = 99999999;
    for (int i = pre[end]; i != -1; i = pre[edge[i].u])
      if (edge[i].c < flow) flow = edge[i].c;
    for (int i = pre[end]; i != -1; i = pre[edge[i].u]) {
      edge[i].c -= flow;
      edge[i ^ 1].c += flow;
    }
    ans += dist[end] * flow;
    flow_sum += flow;
  }
  return ans;
}
void dfs(int x) {
  int i;
  for (i = x + 1; i <= n; i++)
    if (edge[Flag2[x][i]].c == 0) {
      if (A[x] != A[i]) flag[i] = tot;
      dfs(i);
    }
}
int main() {
  int m, a, b, c, i, j, o;
  while (scanf("%d%d", &n, &m) != EOF) {
    init();
    for (i = 1; i <= n; i++) {
      addedge(0, i, 1, 0);
      addedge(n + i, 2 * n + 2, 1, 0);
      scanf("%d", &A[i]);
      value[i] = Cnt(A[i]);
      Flag1[i] = cnt;
      addedge(2 * n + 1, n + i, 1, value[i]);
    }
    addedge(0, 2 * n + 1, m, 0);
    for (i = 1; i <= n; i++)
      for (j = i + 1; j <= n; j++) {
        Flag2[i][j] = cnt;
        if (A[i] == A[j])
          addedge(i, n + j, 1, 0);
        else
          addedge(i, n + j, 1, value[j]);
      }
    o = MCMF(0, 2 * n + 2);
    for (i = 1; i <= n; i++)
      if (edge[Flag1[i]].c == 0) {
        tot++;
        flag[i] = tot;
        dfs(i);
      }
    int oo = 0;
    for (i = 1; i <= n; i++)
      if (flag[i]) oo++;
    printf("%d %d\n", oo + n, o);
    for (i = 1; i <= n; i++) {
      if (flag[i]) {
        printf("%c=%d\n", flag[i] + 96, A[i]);
        p[flag[i]] = A[i];
      }
      for (j = 1; j <= m; j++)
        if (p[j] == A[i]) {
          printf("print(%c)\n", j + 96);
          break;
        }
    }
  }
  return 0;
}