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 N = 2e6 + 5;
const int inf = ~0U >> 1;
template <class U, class V>
struct MCMF {
  static const int N = 6000, M = 201010;
  int h[N], ing[N], pre[N], to[M], ne[M], e, s, t, n;
  U cap[M];
  V dis[N], cost[M];
  void ini(int _n = N) {
    fill(h, h + (n = _n), -1);
    e = 0;
  }
  void liu(int u, int v, U c, V w) {
    to[e] = v;
    ne[e] = h[u];
    cap[e] = c;
    cost[e] = w;
    h[u] = e++;
  }
  void link(int u, int v, U c, V w) {
    liu(u, v, c, w);
    liu(v, u, 0, -w);
  }
  bool spfa() {
    queue<int> Q;
    fill(dis, dis + n, inf);
    Q.push(s), ing[s] = 1, dis[s] = 0;
    while (!Q.empty()) {
      int c = Q.front();
      Q.pop();
      ing[c] = 0;
      for (int k = h[c]; ~k; k = ne[k])
        if (cap[k] > 0) {
          int v = to[k];
          if (dis[c] + cost[k] < dis[v]) {
            dis[v] = dis[c] + cost[k];
            pre[v] = k;
            if (!ing[v]) Q.push(v), ing[v] = 1;
          }
        }
    }
    return dis[t] != inf;
  }
  U flow;
  V mincost;
  pair<U, V> run(int _s, int _t) {
    s = _s, t = _t;
    flow = mincost = 0;
    while (spfa()) {
      U pl = inf;
      int p, k;
      for (p = t; p != s; p = to[k ^ 1]) pl = min(pl, cap[k = pre[p]]);
      for (p = t; p != s; p = to[k ^ 1])
        cap[k = pre[p]] -= pl, cap[k ^ 1] += pl;
      mincost += pl * dis[t];
      flow += pl;
    }
    return make_pair(flow, mincost);
  }
};
MCMF<int, int> flow;
int n, m;
int c[N], a[N];
int pre[N], nx[N], ans[N];
bool vis[N];
int main() {
  cin >> n >> m;
  for (int i = (1); i < (n + 1); i++) {
    int x;
    cin >> a[i];
    x = a[i];
    while (x) {
      if (x & 1) c[i]++;
      x /= 2;
    }
  }
  int s = 0, t = 5000;
  flow.ini();
  int mn = -1e6;
  for (int i = (1); i < (n + 1); i++) {
    flow.link(i - 1, i, m, 0);
    flow.link(i, i + n, 1, c[i]);
    flow.link(i + n, i + 2 * n, 1, mn);
    int nx = i + 1;
    if (nx == n + 1) nx = t;
    flow.link(i + 2 * n, nx, 1, 0);
    for (int j = (i + 1); j < (n + 1); j++) {
      if (a[i] == a[j]) {
        flow.link(i + 2 * n, j + n, 1, 0);
        break;
      }
    }
  }
  flow.link(n, t, m, 0);
  int cost = flow.run(s, t).second - n * mn, cc = n;
  for (int i = (1); i < (n + 1); i++) {
    for (int k = flow.h[i + n]; k != -1; k = flow.ne[k]) {
      if (flow.cap[k] == 1) {
        if (flow.to[k] == i)
          pre[i] = -1, cc++;
        else
          pre[i] = flow.to[k] - 2 * n, nx[flow.to[k] - 2 * n] = i;
      }
    }
  }
  cout << cc << " " << cost << "\n";
  for (int i = (1); i < (n + 1); i++) {
    if (pre[i] == -1) {
      int pos;
      for (int j = (0); j < (m); j++)
        if (!vis[j]) {
          pos = j;
          break;
        }
      char c = 'a' + pos;
      cout << c << "=" << a[i] << "\n";
      cout << "print(" << c << ")\n";
      ans[i] = pos;
      if (nx[i]) vis[pos] = true;
    } else {
      char c = 'a' + ans[pre[i]];
      cout << "print(" << c << ")\n";
      ans[i] = ans[pre[i]];
      if (!nx[i]) vis[ans[i]] = false;
    }
  }
  return 0;
}