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>
const int INF = 0x3f3f3f3f;
const long long int INFLL = 0x3f3f3f3f3f3f3f3fll;
long long int getint() {
  long long int ret = 0;
  bool f = 0;
  char c;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') f ^= 1;
  while (c >= '0' && c <= '9') {
    ret = ret * 10 + c - '0';
    c = getchar();
  }
  return f ? -ret : ret;
}
using namespace std;
const int MAXN = 600;
const int inf = 100000;
const int MAXM = MAXN * MAXN;
int a[MAXN + 10], num[MAXN + 10];
int ans[MAXN + 10], n, m, val[MAXN + 10];
namespace ISAP {
struct edge {
  int v, c, w;
  edge *nxt, *other;
  edge() {}
  edge(int _v, int _c, int _w, edge *_nxt, edge *_other) {
    v = _v;
    c = _c;
    w = _w;
    nxt = _nxt;
    other = _other;
  }
} E[2 * MAXM + 10], *cnte = E, *fir[MAXN + 10], *fa[MAXN + 10];
void addedge(int u, int v, int c, int w) {
  *cnte = edge(v, c, w, fir[u], cnte + 1);
  fir[u] = cnte++;
  *cnte = edge(u, 0, -w, fir[v], cnte - 1);
  fir[v] = cnte++;
}
int dis[MAXN + 10], aug[MAXN + 10], s, t;
bool vis[MAXN + 10];
queue<int> myq;
bool Spfa(int p) {
  memset(dis, 0x3f, sizeof dis);
  memset(vis, 0, sizeof vis);
  myq.push(s);
  aug[s] = p;
  dis[s] = 0;
  while (!myq.empty()) {
    int u = myq.front(), v;
    myq.pop();
    vis[u] = 0;
    for (edge *p = fir[u]; p; p = p->nxt)
      if (p->c > 0 && dis[v = p->v] > dis[u] + p->w) {
        dis[v] = dis[u] + p->w;
        aug[v] = min(aug[u], p->c);
        fa[v] = p;
        if (!vis[v]) {
          vis[v] = 1;
          myq.push(v);
        }
      }
  }
  return dis[t] < INF;
}
int work(int _s, int _t, int p) {
  int ret = 0;
  s = _s;
  t = _t;
  while (p--) {
    if (!Spfa(1)) return ret;
    int stream = aug[t], u = t;
    if (dis[t] > 0) return ret;
    ret += aug[t] * dis[t];
    while (fa[u]) {
      fa[u]->c -= stream;
      fa[u]->other->c += stream;
      u = fa[u]->other->v;
    }
  }
  return ret;
}
void print(int td) {
  int cnt = 0;
  for (int i = 1; i <= n; ++i)
    if (!ans[i]) {
      int u = i + n;
      ++cnt;
      while (u) {
        ans[u - n] = cnt;
        for (edge *p = fir[u]; p; p = p->nxt)
          if (!p->c) {
            int v = p->v;
            if (v == t)
              u = 0;
            else
              u = p->v + n;
          }
      }
    }
  for (int i = 1; i <= m; ++i) val[i] = -1;
  int num = 0;
  for (int i = 1; i <= n; ++i) {
    int t = ans[i];
    if (val[t] != a[i]) ++num;
    val[t] = a[i];
    ++num;
  }
  printf("%d %d\n", num, td);
  for (int i = 1; i <= m; ++i) val[i] = -1;
  for (int i = 1; i <= n; ++i) {
    int t = ans[i];
    if (val[t] != a[i]) printf("%c=%d\n", t + 'a' - 1, a[i]);
    val[t] = a[i];
    printf("print(%c)\n", t + 'a' - 1);
  }
}
}  // namespace ISAP
using ISAP::addedge;
using ISAP::work;
int bitcount(int x) {
  int ret = 0;
  while (x) x -= x & -x, ++ret;
  return ret;
}
int main() {
  n = getint();
  m = getint();
  for (int i = 1; i <= n; ++i) {
    a[i] = getint();
    num[i] = bitcount(a[i]);
  }
  int s = 2 * n + 1, t = 2 * n + 2;
  for (int i = 1; i <= n; ++i) {
    addedge(s, i, 1, num[i]);
    addedge(i, i + n, 1, -inf);
    addedge(i + n, t, 1, 0);
    for (int j = i + 1; j <= n; ++j)
      addedge(i + n, j, 1, a[i] == a[j] ? 0 : num[j]);
  }
  ISAP::print(work(s, t, m) + n * inf);
  return 0;
}