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 = 1010, INF = 0x3f3f3f3f;
struct Edge {
  int nex, v, c, len;
  Edge(int Nex = 0, int V = 0, int C = 0, int L = 0) {
    nex = Nex;
    v = V;
    c = C;
    len = L;
  }
} edge[1000000];
int tp = 1;
int X[N];
struct Node {
  int p, v;
  bool f;
  Node(int P = 0, int V = 0, bool F = 0) {
    p = P;
    v = V;
    f = F;
  }
  inline void out() {
    if (!f) {
      printf("print(");
      putchar('a' + p - 1);
      printf(")\n");
    } else {
      putchar('a' + p - 1);
      printf("=%d\n", X[v]);
    }
    return;
  }
} stk[N];
int top;
int xx, Last[N], nex[N], in[N], e[N], tag[N];
int n, m, a[N], val[N], pre[N], vis[N], flow[N], d[N];
std::queue<int> Q;
inline void Max(int &a, const int &b) {
  a < b ? a = b : 0;
  return;
}
inline void add(int x, int y, int z, int w) {
  edge[++tp] = Edge(e[x], y, z, w);
  e[x] = tp;
  edge[++tp] = Edge(e[y], x, 0, -w);
  e[y] = tp;
  return;
}
inline bool SPFA(int s, int t) {
  static int Time = 0;
  ++Time;
  memset(d, 0x3f, sizeof(d));
  Q.push(s);
  vis[s] = Time;
  flow[s] = INF;
  d[s] = 0;
  while (!Q.empty()) {
    int x = Q.front();
    Q.pop();
    vis[x] = 0;
    for (int i = e[x]; i; i = edge[i].nex) {
      int y = edge[i].v;
      if (d[y] > d[x] + edge[i].len && edge[i].c) {
        d[y] = d[x] + edge[i].len;
        flow[y] = std::min(flow[x], edge[i].c);
        pre[y] = i;
        if (vis[y] != Time) {
          vis[y] = Time;
          Q.push(y);
        }
      }
    }
  }
  return d[t] < INF;
}
inline void update(int s, int t) {
  int f = flow[t];
  while (t != s) {
    int i = pre[t];
    edge[i].c -= f;
    edge[i ^ 1].c += f;
    t = edge[i ^ 1].v;
  }
  return;
}
inline int solve(int s, int t, int &cost) {
  int ans = 0;
  cost = 0;
  while (SPFA(s, t)) {
    ans += flow[t];
    cost += flow[t] * d[t];
    update(s, t);
  }
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    int x = a[i];
    while (x) {
      x -= x & (-x);
      val[i]++;
    }
    X[i] = a[i];
  }
  std::sort(X + 1, X + n + 1);
  xx = std::unique(X + 1, X + n + 1) - X - 1;
  for (int i = 1; i <= n; i++) {
    a[i] = std::lower_bound(X + 1, X + xx + 1, a[i]) - X;
  }
  for (int i = n; i >= 1; i--) {
    nex[i] = Last[a[i]];
    Last[a[i]] = i;
  }
  int s = n * 3 + 2, t = s + 1, ss = s + 2, tt = s + 3;
  for (int i = 1; i <= n; i++) {
    in[i + n]++;
    in[i]--;
    add(i + 2 * n, i, 1, val[i]);
    add(i + n, i + 1 + 2 * n, 1, 0);
    add(i + 2 * n, i + 1 + 2 * n, INF, 0);
    if (nex[i]) {
      add(i + n, nex[i], 1, 0);
    }
  }
  add(s, 1 + 2 * n, m, 0);
  add(n + 1 + 2 * n, t, m, 0);
  int Ck = tp;
  add(t, s, INF, 0);
  for (int i = 1; i <= t; i++) {
    if (in[i]) {
      if (in[i] > 0) {
        add(ss, i, in[i], 0);
      } else {
        add(i, tt, -in[i], 0);
      }
    }
  }
  int cost1 = 0, cost2 = 0;
  solve(ss, tt, cost1);
  for (int i = Ck + 1; i <= tp; i++) {
    edge[i].c = 0;
  }
  solve(s, t, cost2);
  for (int i = 1; i <= m; i++) {
    Q.push(i);
  }
  for (int j = 1; j <= n; j++) {
    int x = j + 2 * n;
    for (int i = e[x]; i; i = edge[i].nex) {
      int y = edge[i].v;
      if (y == j && edge[i ^ 1].c) {
        tag[j] = Q.front();
        Q.pop();
        stk[++top] = Node(tag[j], a[j], 1);
        break;
      }
    }
    stk[++top] = Node(tag[j], 0, 0);
    x = j + n;
    for (int i = e[x]; i; i = edge[i].nex) {
      int y = edge[i].v;
      if (y == nex[j] && edge[i ^ 1].c) {
        tag[nex[j]] = tag[j];
        break;
      }
      if (y == j + 1 + 2 * n && edge[i ^ 1].c) {
        Q.push(tag[j]);
        break;
      }
    }
  }
  printf("%d %d\n", top, cost1 + cost2);
  for (int i = 1; i <= top; i++) stk[i].out();
  return 0;
}