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 = 600;
const int MaxM = MaxN * MaxN;
const int INF = 0x3f3f3f3f;
struct Node {
  int v, c, cost, flag;
  Node *nxt, *twin;
} * g[MaxN], pool[MaxM], *tail = pool, *pre[MaxN];
int d[MaxN], flow[MaxN];
int n, m, S, HUB, T, SS, TT;
int a[MaxN];
map<int, pair<int, int> > opr;
inline void make_edge(int u, int v, int c, int cost, int flag = 0) {
  tail->v = v;
  tail->c = c;
  tail->cost = cost;
  tail->twin = tail + 1;
  tail->flag = flag;
  tail->nxt = g[u];
  g[u] = tail++;
  tail->v = u;
  tail->c = 0;
  tail->cost = -cost;
  tail->twin = tail - 1;
  tail->flag = 0;
  tail->nxt = g[v];
  g[v] = tail++;
}
int spfa(int S, int T) {
  queue<int> q;
  static int inq[MaxN];
  memset(d, 0x3f, sizeof(d));
  d[S] = 0;
  memset(flow, 0, sizeof(flow));
  flow[S] = INF;
  memset(pre, 0, sizeof(pre));
  q.push(S);
  inq[S] = 1;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    inq[u] = 0;
    for (Node *p = g[u]; p; p = p->nxt)
      if (p->c && p->cost + d[u] < d[p->v]) {
        d[p->v] = d[u] + p->cost;
        flow[p->v] = min(flow[u], p->c);
        pre[p->v] = p;
        if (!inq[p->v]) q.push(p->v), inq[p->v] = 1;
      }
  }
  return d[T] < INF;
}
int aug(int S, int T) {
  int dt = flow[T] * d[T];
  for (Node *p = pre[T]; p; p = pre[p->twin->v])
    p->c -= flow[T], p->twin->c += flow[T];
  return dt;
}
int costFlow(int S, int T) {
  int res = 0;
  while (spfa(S, T)) res += aug(S, T);
  return res;
}
int vis[MaxN], tot;
void dfs(int num, int u) {
  vis[u] = 1;
  for (Node *p = g[u + n]; p; p = p->nxt)
    if (p->flag && !p->c && !vis[p->v]) {
      opr[p->v] = pair<int, int>(num, a[u] != a[p->v]);
      tot += 1 + (a[u] != a[p->v]);
      dfs(num, p->v);
    }
}
int main() {
  scanf("%d%d", &n, &m);
  S = 0;
  HUB = n * 2 + 1;
  T = n * 2 + 2;
  SS = n * 2 + 3;
  TT = n * 2 + 4;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  make_edge(S, HUB, m, 0);
  make_edge(T, S, INF, 0);
  for (int i = 1; i <= n; i++)
    make_edge(HUB, i, 1, __builtin_popcount(a[i])), make_edge(i + n, T, 1, 0),
        make_edge(SS, i + n, 1, 0), make_edge(i, TT, 1, 0);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      make_edge(i + n, j, 1, a[i] == a[j] ? 0 : __builtin_popcount(a[j]), 1);
  int res = costFlow(SS, TT);
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (!vis[i]) opr[i] = pair<int, int>(++cnt, 1), tot += 2, dfs(cnt, i);
  printf("%d %d\n", tot, res);
  for (map<int, pair<int, int> >::iterator p = opr.begin(); p != opr.end();
       p++) {
    p->second.second ? printf("%c=%d\n", p->second.first - 1 + 'a', a[p->first])
                     : 0;
    printf("print(%c)\n", p->second.first - 1 + 'a');
  }
  return 0;
}