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 oo = INT_MAX >> 1;
struct edge {
  int u, v, c, d, n;
};
struct MCMF {
  edge a[500000];
  int H[1100], dis[1100], in[1100], pre[1100], cnt, T;
  queue<int> Q;
  void add(int u, int v, int c, int d) {
    a[cnt].u = u;
    a[cnt].v = v;
    a[cnt].c = c;
    a[cnt].d = d;
    a[cnt].n = H[u];
    H[u] = cnt++;
  }
  void build(int u, int v, int c, int d) {
    add(u, v, c, d);
    add(v, u, 0, -d);
  }
  void init(int t) {
    T = t;
    cnt = 0;
    memset(H, -1, sizeof(H));
  }
  int mcmf() {
    int i, tt, u, v, c, d, res = 0;
    for (;;) {
      for (i = 1; i <= T; i++) dis[i] = oo;
      dis[0] = 0;
      memset(in, 0, sizeof(in));
      Q.push(0);
      while (!Q.empty()) {
        u = Q.front();
        Q.pop();
        in[u] = 0;
        for (tt = H[u]; ~tt; tt = a[tt].n) {
          if (!a[tt].c) continue;
          v = a[tt].v;
          d = a[tt].d;
          if (dis[u] + d < dis[v]) {
            dis[v] = dis[u] + d;
            pre[v] = tt;
            if (!in[v]) {
              Q.push(v);
              in[v] = 1;
            }
          }
        }
      }
      if (dis[T] == oo) return res;
      res += dis[T];
      v = T;
      while (v) {
        tt = pre[v];
        --a[tt].c;
        ++a[tt ^ 1].c;
        v = a[tt].u;
      }
    }
  }
  void solve(int N, int w[]) {
    int ans = mcmf(), line = N;
    int i, j, tt;
    memset(pre, 0, sizeof(pre));
    for (tt = 0; tt < cnt; tt += 2) {
      i = a[tt].u;
      j = a[tt].v;
      if (!i) continue;
      if (i == N * 2 + 1) i = 0;
      if (0 <= i && i <= N && N + 1 <= j && j <= N * 2 && !a[tt].c) {
        j -= N;
        pre[j] = i;
        if (a[tt].d) ++line;
      }
    }
    cout << line << ' ' << ans << endl;
    char v = 'a', c;
    for (i = 1; i <= N; i++) {
      if (!pre[i]) {
        c = v++;
        cout << c << '=' << w[i] << endl;
      } else {
        c = pre[pre[i]];
        if (w[i] != w[pre[i]]) cout << c << '=' << w[i] << endl;
      }
      cout << "print(" << c << ")" << endl;
      pre[i] = c;
    }
  }
};
MCMF E;
int a[300], c[300];
int main() {
  int N, M;
  cin >> N >> M;
  int T = N + N + 1 + 1;
  E.init(T);
  int i, j;
  for (i = 1; i <= N; i++) {
    cin >> a[i];
    for (j = 0; j < 31; j++)
      if (a[i] & (1 << j)) ++c[i];
  }
  int x = N + N + 1;
  E.build(0, x, M, 0);
  for (i = 1; i <= N; i++) {
    E.build(0, i, 1, 0);
    E.build(i + N, T, 1, 0);
    E.build(x, i + N, 1, c[i]);
    for (j = i + 1; j <= N; j++) E.build(i, j + N, 1, a[i] == a[j] ? 0 : c[j]);
  }
  E.solve(N, a);
}