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 N = 250;
const int M = 26;
inline int min(int x, int y) {
  if (x < y) return x;
  return y;
}
struct NetWork {
  static const int V = N * 3 + 2 + 2;
  static const int E = N * N + N * 5 + 1;
  static const int inf = (int)1e9;
  struct Edge {
    int to, cap, flow, cost, nxt;
    Edge() {}
    Edge(int _to, int _cap, int _cost, int _nxt)
        : to(_to), cap(_cap), cost(_cost), nxt(_nxt) {
      flow = 0;
    }
  } edge[E * 2 + 5];
  int Gsz, head[V + 5];
  bool key[E * 2 + 5];
  inline void add_edge(int u, int v, int cap, int cost, bool flag) {
    key[Gsz] = key[Gsz + 1] = flag;
    edge[Gsz] = Edge(v, cap, cost, head[u]);
    head[u] = Gsz++;
    edge[Gsz] = Edge(u, 0, -cost, head[v]);
    head[v] = Gsz++;
  }
  int src, dest, n;
  void init(int _n) {
    n = _n;
    src = n++;
    dest = n++;
    for (int i = 0, i_END_ = n; i < i_END_; ++i) head[i] = -1;
    Gsz = 0;
  }
  int dis[V + 5], flow[V + 5], pre[V + 5];
  int que[V + 5];
  bool inque[V + 5];
  bool SPFA() {
    for (int i = 0, i_END_ = n; i < i_END_; ++i) {
      dis[i] = inf;
      inque[i] = false;
    }
    int L = 0, H = 0;
    que[H++] = src;
    if (H == V + 5) H = 0;
    inque[src] = true;
    dis[src] = 0;
    flow[src] = inf;
    while (L != H) {
      int u = que[L++];
      if (L == V + 5) L = 0;
      inque[u] = false;
      for (int i = head[u]; ~i; i = edge[i].nxt) {
        int v = edge[i].to, rest = edge[i].cap - edge[i].flow;
        if (rest > 0 && dis[v] > dis[u] + edge[i].cost) {
          dis[v] = dis[u] + edge[i].cost;
          flow[v] = min(flow[u], rest);
          pre[v] = i;
          if (!inque[v]) {
            que[H++] = v;
            if (H == V + 5) H = 0;
            inque[v] = true;
          }
        }
      }
    }
    return dis[dest] != inf;
  }
  bool SPFA_() {
    for (int i = 0, i_END_ = n; i < i_END_; ++i) {
      dis[i] = inf;
      inque[i] = false;
    }
    int L = 0, H = 0;
    que[H++] = dest;
    if (H == V + 5) H = 0;
    inque[dest] = true;
    dis[dest] = 0;
    flow[dest] = inf;
    while (L != H) {
      int u = que[L++];
      if (L == V + 5) L = 0;
      inque[u] = false;
      for (int i = head[u]; ~i; i = edge[i].nxt) {
        if (key[i]) continue;
        int v = edge[i].to, rest = edge[i].cap - edge[i].flow;
        if (rest > 0 && dis[v] > dis[u] + edge[i].cost) {
          dis[v] = dis[u] + edge[i].cost;
          flow[v] = min(flow[u], rest);
          pre[v] = i;
          if (!inque[v]) {
            que[H++] = v;
            if (H == V + 5) H = 0;
            inque[v] = true;
          }
        }
      }
    }
    return dis[src] != inf;
  }
  int CostFlow() {
    int res = 0;
    while (SPFA()) {
      res += flow[dest] * dis[dest];
      for (int u = dest; u != src; u = edge[pre[u] ^ 1].to) {
        edge[pre[u]].flow += flow[dest];
        edge[pre[u] ^ 1].flow -= flow[dest];
      }
    }
    while (SPFA_()) {
      if (dis[src] >= 0) break;
      res += flow[src] * dis[src];
      for (int u = src; u != dest; u = edge[pre[u] ^ 1].to) {
        edge[pre[u]].flow += flow[src];
        edge[pre[u] ^ 1].flow -= flow[src];
      }
    }
    return res;
  }
} nw;
int n, m;
int a[N + 5], q[N + 5];
void input() {
  scanf("%d %d", &n, &m);
  for (int i = 0, i_END_ = n; i < i_END_; ++i) {
    scanf("%d", &a[i]);
    q[i] = 0;
    for (int j = 0, j_END_ = 31; j < j_END_; ++j) q[i] += a[i] >> j & 1;
  }
}
void build() {
  nw.init(2 * n + 2);
  int x = 2 * n, y = 2 * n + 1;
  nw.add_edge(x, nw.dest, m, 0, false);
  nw.add_edge(nw.src, y, m, 0, false);
  for (int i = 0, i_END_ = n; i < i_END_; ++i) {
    nw.add_edge(nw.src, i, 1, 0, true);
    nw.add_edge(i + n, nw.dest, 1, 0, true);
    nw.add_edge(y, i + n, 1, q[i], false);
    nw.add_edge(i, x, 1, 0, false);
    for (int j = i + 1, j_END_ = n; j < j_END_; ++j)
      nw.add_edge(i, j + n, 1, a[i] == a[j] ? 0 : q[j], false);
  }
}
int nxt[N + 5];
int id[N + 5], change[N + 5];
void output() {
  int penalty = nw.CostFlow();
  for (int i = 0, i_END_ = n; i < i_END_; ++i) nxt[i] = -1;
  for (int i = 0; i < nw.Gsz; i += 2) {
    int u = nw.edge[i ^ 1].to, v = nw.edge[i].to, cap = nw.edge[i].cap,
        flow = nw.edge[i].flow;
    assert(cap > 0);
    if (0 <= u && u < n && n <= v && v < 2 * n)
      if (flow > 0) nxt[u] = v - n;
  }
  for (int i = 0, i_END_ = n; i < i_END_; ++i) {
    id[i] = -1;
    change[i] = -1;
  }
  int cur = 0, cnt = 0;
  for (int i = 0, i_END_ = n; i < i_END_; ++i)
    if (id[i] == -1) {
      int p = i;
      change[p] = a[p];
      cnt++;
      for (;;) {
        id[p] = cur;
        if (nxt[p] == -1) break;
        if (a[p] != a[nxt[p]]) {
          change[nxt[p]] = a[nxt[p]];
          cnt++;
        }
        p = nxt[p];
      }
      cur++;
    }
  printf("%d %d\n", cnt + n, penalty);
  for (int i = 0, i_END_ = n; i < i_END_; ++i) {
    char c = id[i] + 'a';
    if (change[i] != -1) printf("%c=%d\n", c, change[i]);
    printf("print(%c)\n", c);
  }
}
int main() {
  input();
  build();
  output();
  return 0;
}