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 long long LINF = ~(((long long)0x1) << 63) / 2;
const int INF = 0X003F3F3F;
struct Edge {
  int from, to, v, cost, tail;
} edge[111000 * 40];
int qu[111000 * 10];
int head[111000], now, dist[111000], pre[111000], pos[111000];
bool Inqueue[111000];
void insert(int from, int to, int v, int cost) {
  edge[now].cost = cost;
  edge[now].v = v;
  edge[now].to = to;
  edge[now].tail = head[from];
  edge[now].from = from;
  head[from] = now++;
  edge[now].cost = -cost;
  edge[now].to = from;
  edge[now].v = 0;
  edge[now].tail = head[to];
  edge[now].from = to;
  head[to] = now++;
}
bool spfa(int s, int t, int n) {
  int i, j, k, r;
  for (i = 1; i <= n; i++) dist[i] = INT_MAX;
  int front, tail;
  memset(pre, -1, sizeof(pre));
  memset(Inqueue, 0, sizeof(Inqueue));
  front = tail = 0;
  qu[tail++] = s;
  pre[s] = s;
  dist[s] = 0;
  Inqueue[s] = 1;
  while (front != tail) {
    k = qu[front++];
    Inqueue[k] = false;
    k = head[k];
    while (k != -1) {
      if (edge[k].v > 0 &&
          dist[edge[k].to] > dist[edge[k].from] + edge[k].cost) {
        dist[edge[k].to] = dist[edge[k].from] + edge[k].cost;
        pre[edge[k].to] = edge[k].from;
        pos[edge[k].to] = k;
        if (!Inqueue[edge[k].to]) {
          Inqueue[edge[k].to] = true;
          qu[tail++] = edge[k].to;
        }
      }
      k = edge[k].tail;
    }
  }
  return pre[t] != -1 && dist[t] < INT_MAX;
}
int MinCost(int s, int t, int n) {
  int flow = 0, cost = 0, min, i;
  while (spfa(s, t, n)) {
    min = INT_MAX;
    for (i = t; i != s; i = pre[i]) {
      if (edge[pos[i]].v < min) min = edge[pos[i]].v;
    }
    flow += min;
    cost += min * dist[t];
    for (i = t; i != s; i = pre[i]) {
      edge[pos[i]].v -= min;
      edge[pos[i] ^ 1].v += min;
    }
  }
  return cost;
}
int value[300];
int a[300];
int s, t, S, T, n, m;
vector<string> ans[300];
string trans(int b) {
  string ans = "";
  vector<int> c;
  while (b) {
    c.push_back(b % 10);
    b /= 10;
  }
  for (int i = c.size() - 1; i >= 0; i--) {
    char now = c[i] + '0';
    ans = ans + now;
  }
  return ans;
}
void dfs(int u, int now, char p, int pre) {
  if (u == t) return;
  if (now == 0) {
    string re = "";
    if (pre == s || a[pre - n] != a[u]) {
      re += p;
      re += '=';
      re += trans(a[u]);
      ans[u].push_back(re);
    }
    re = "";
    re += "print(";
    re += p;
    re += ")";
    ans[u].push_back(re);
    for (int h = head[u]; h != -1; h = edge[h].tail) {
      if (edge[h].to == u + n) dfs(edge[h].to, now ^ 1, p, u);
    }
  } else {
    for (int h = head[u]; h != -1; h = edge[h].tail) {
      int v = edge[h].to;
      if (edge[h].v == 0 && v >= 1 && v <= n && v > u - n)
        dfs(v, now ^ 1, p, u);
    }
  }
}
int main() {
  int i, j, k;
  cin >> n >> m;
  now = 0;
  memset(head, -1, sizeof(head));
  s = 2 * n + 1, t = 2 * n + 2, S = t + 1, T = S + 1;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= n; i++)
    for (j = a[i]; j; j -= j & -j) value[i]++;
  for (i = 1; i <= n; i++) insert(i, i + n, 1, -INF);
  for (i = 1; i <= n; i++) {
    insert(s, i, 1, value[i]);
    insert(i + n, t, 1, 0);
    for (j = i + 1; j <= n; j++)
      if (a[j] == a[i]) {
        insert(i + n, j, 1, 0);
      } else
        insert(i + n, j, 1, value[j]);
  }
  insert(s, t, m, 0);
  insert(S, s, m, 0);
  insert(t, T, m, 0);
  int re = MinCost(S, T, T);
  int reans = n * INF + re;
  char now = 'a';
  for (int h = head[s]; h != -1; h = edge[h].tail) {
    int u = edge[h].to;
    if (edge[h].v == 0 && u >= 1 && u <= n) {
      dfs(u, 0, now, s);
      now++;
    }
  }
  re = 0;
  for (i = 1; i <= n; i++) re += ans[i].size();
  cout << re << " " << reans << endl;
  for (i = 1; i <= n; i++)
    for (j = 0; j < ans[i].size(); j++) cout << ans[i][j] << endl;
  return 0;
}