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;
struct mcmf {
  int fst[1020], nxt[200002], vv[200002], cost[200002], cap[200002],
      flow[200002], e;
  int p[1020], inq[1020], a[1020], d[1020];
  void init() {
    memset(fst, -1, sizeof fst);
    e = 0;
  }
  void add(int u, int v, int c, int d) {
    vv[e] = v, nxt[e] = fst[u], cap[e] = c, flow[e] = 0, cost[e] = d,
    fst[u] = e++;
    vv[e] = u, nxt[e] = fst[v], cap[e] = 0, flow[e] = 0, cost[e] = -d,
    fst[v] = e++;
  }
  bool spfa(int s, int t, int &mf, int &mc) {
    memset(d, 0x3f, sizeof d);
    d[s] = 0, a[s] = 0x3f3f3f3f;
    queue<int> q;
    q.push(s);
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      inq[u] = 0;
      for (int i = fst[u]; ~i; i = nxt[i]) {
        int v = vv[i], c = cost[i];
        if (cap[i] > flow[i] && d[v] > d[u] + c) {
          d[v] = d[u] + c;
          a[v] = min(a[u], cap[i] - flow[i]);
          p[v] = i;
          if (!inq[v]) inq[v] = 1, q.push(v);
        }
      }
    }
    if (d[t] == 0x3f3f3f3f) return 0;
    mf += a[t];
    mc += d[t] * a[t];
    int u = t;
    while (u != s) {
      flow[p[u]] += a[t];
      flow[p[u] ^ 1] -= a[t];
      u = vv[p[u] ^ 1];
    }
    return 1;
  }
  int gao(int s, int t) {
    int mf = 0, mc = 0;
    while (spfa(s, t, mf, mc))
      ;
    return mc;
  }
} go;
int n, m;
int a[1020];
map<int, int> pre;
int num[1020];
int calc(int x) {
  int ret = 0;
  while (x) {
    ret++;
    x -= x & -x;
  }
  return ret;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  int s = 0, t = 3 * n + 1;
  go.init();
  go.add(s, 1, m, 0);
  for (int i = 1; i <= n; ++i) {
    go.add(i, i == n ? t : i + 1, m, 0);
    go.add(i, i + n, 1, calc(a[i]));
    go.add(i + n, i + 2 * n, 1, -1000000);
    go.add(i + 2 * n, i == n ? t : i + 1, 1, 0);
  }
  for (int i = n; i >= 1; --i) {
    if (pre.count(a[i])) {
      go.add(i + 2 * n, pre[a[i]] + n, 1, 0);
    }
    pre[a[i]] = i;
  }
  int mc = go.gao(s, t) + n * 1000000;
  vector<pair<int, int> > ans;
  memset(num, -1, sizeof num);
  for (int i = 1; i <= n; ++i) {
    int f = 0;
    for (int k = 1; k <= m; ++k) {
      if (num[k] == a[i]) {
        f = k;
        break;
      }
    }
    if (!f) {
      for (int k = 1; k <= m; ++k) {
        if (num[k] == -1) {
          ans.push_back(make_pair(-k, a[i]));
          num[k] = a[i];
          f = k;
          break;
        }
      }
    }
    if (f == 0) {
      vector<int> gg;
      gg[1] = -1;
    }
    ans.push_back(make_pair(f, a[i]));
    for (int j = go.fst[i + 2 * n]; ~j; j = go.nxt[j]) {
      int v = go.vv[j];
      if (v == i + 1) {
        if (go.cap[j] == go.flow[j]) {
          for (int k = 1; k <= m; ++k) {
            if (num[k] == a[i]) num[k] = -1;
          }
        }
      }
    }
  }
  printf("%d %d\n", (int)ans.size(), mc);
  for (int i = 0; i < ans.size(); ++i) {
    if (ans[i].first < 0)
      printf("%c=%d\n", -ans[i].first + 'a' - 1, ans[i].second);
    else
      printf("print(%c)\n", ans[i].first + 'a' - 1);
  }
  return 0;
}