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;
class Edge {
 public:
  int x, y, f, c, op, next;
  Edge() {}
  Edge(int _x, int _y, int _c, int _f, int _next, int _op)
      : x(_x), y(_y), c(_c), f(_f), next(_next), op(_op) {}
};
int g[1000], g2[1000], pre[1000], id[1000];
Edge E[500000];
int n, m, tot_e, s, ss, t, tt, ans;
int a[300];
int inf = 80000;
int d[10000];
bool vi[10000];
void build_edge(int x, int y, int c, int f) {
  tot_e++, E[tot_e] = Edge(x, y, c, f, g[x], tot_e + 1), g[x] = tot_e;
  tot_e++, E[tot_e] = Edge(y, x, 0, -f, g[y], tot_e - 1), g[y] = tot_e;
}
int cnt(int x) {
  int ans = 0;
  while (x) x -= x & -x, ans++;
  return ans;
}
bool modifyLabel() {
  int tmp = inf * n * 10;
  for (int x = 1; x <= t; x++)
    if (vi[x]) {
      for (int i = g2[x]; i != -1; i = E[i].next) {
        int y = E[i].y;
        if (E[i].c && !vi[y] && d[y] + E[i].f - d[x] < tmp)
          tmp = d[y] + E[i].f - d[x];
      }
    }
  if (tmp == inf * n * 10) return 0;
  for (int x = 1; x <= t; x++)
    if (vi[x]) d[x] += tmp;
  return 1;
}
int flow = 0;
int dfs(int x, int v) {
  vi[x] = 1;
  if (x == t) {
    ans += v * d[s];
    flow += v;
    return v;
  }
  for (int i = g[x]; i != -1; i = E[i].next) {
    int y = E[i].y;
    if (!vi[y] && d[x] == d[y] + E[i].f && E[i].c) {
      int tmp = dfs(y, min(v, E[i].c));
      if (tmp) {
        E[i].c -= tmp;
        E[E[i].op].c += tmp;
        g[x] = i;
        return tmp;
      }
    }
  }
  g[x] = -1;
  return 0;
}
void SPFA() {
  for (int i = 1; i <= t; i++) d[i] = inf * n * 10;
  memset(vi, 0, sizeof(vi));
  vi[t] = 1;
  d[t] = 0;
  queue<int> Q;
  for (Q.push(t); !Q.empty(); Q.pop()) {
    int x = Q.front();
    for (int i = g[x]; i != -1; i = E[i].next) {
      int y = E[i].y;
      if (E[E[i].op].c && d[y] > d[x] + E[E[i].op].f) {
        d[y] = d[x] + E[E[i].op].f;
        if (!vi[y]) {
          vi[y] = 1;
          Q.push(y);
        }
      }
    }
    vi[x] = 0;
  }
}
void MincostFlow() {
  SPFA();
  memset(vi, 0, sizeof(vi));
  vi[s] = 1;
  memcpy(g2, g, sizeof(g));
  ans = 0;
  while (modifyLabel() && d[s] < 0) {
    memcpy(g, g2, sizeof(g2));
    do {
      memset(vi, 0, sizeof(vi));
    } while (dfs(s, inf) != 0);
  }
  ans += inf * n;
  memcpy(g, g2, sizeof(g2));
  memset(pre, 0xff, sizeof(pre));
  for (int x = 1; x <= n; x++)
    for (int i = g[n + x]; i != -1; i = E[i].next) {
      int y = E[i].y;
      if (y <= n && E[i].c == 0) {
        pre[y] = x;
      }
    }
  int now = -1, tot = 0;
  for (int x = 1; x <= n; x++)
    if (pre[x] == -1) {
      id[x] = ++now;
      tot += 2;
    } else {
      id[x] = id[pre[x]];
      tot++;
      if (a[x] != a[pre[x]]) tot++;
    }
  cout << tot << " " << ans << endl;
  for (int x = 1; x <= n; x++)
    if (pre[x] == -1 || pre[x] != -1 && a[x] != a[pre[x]]) {
      printf("%c=%d\n", 'a' + id[x], a[x]);
      printf("print(%c)\n", 'a' + id[x]);
    } else {
      printf("print(%c)\n", 'a' + id[x]);
    }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i];
  memset(g, 0xff, sizeof(g));
  s = 2 * n + 1;
  ss = s + 1;
  tt = ss + 1;
  t = tt + 1;
  build_edge(s, ss, m, 0);
  build_edge(tt, t, m, 0);
  for (int i = 1; i <= n; i++) {
    build_edge(ss, i, 1, cnt(a[i]));
    build_edge(i + n, tt, 1, 0);
    build_edge(i, n + i, 1, -inf);
    for (int j = i + 1; j <= n; j++)
      if (a[i] == a[j])
        build_edge(n + i, j, 1, 0);
      else
        build_edge(n + i, j, 1, cnt(a[j]));
  }
  MincostFlow();
  return 0;
}