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;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && (c != '-')) c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * f;
}
namespace MCMF {
const int N = 1010, M = 1e5 + 10;
const long long inf = 1e15;
int tot = -1, first[N], to[M << 1], last[M << 1], flow[M << 1];
long long cost[M << 1];
inline void init() { memset((first), (-1), sizeof(first)); }
inline void add(int x, int y, int w, long long f) {
  to[++tot] = y, flow[tot] = w, cost[tot] = f, last[tot] = first[x],
  first[x] = tot;
}
inline void Add(int x, int y, int w, long long f) {
  add(x, y, w, f), add(y, x, 0, -f);
}
long long dis[N], Flow[N];
int pre[N], pos[N];
bool vis[N];
inline bool spfa(int s, int t) {
  for (register int i = (s); i <= (t); i++) vis[i] = 0, dis[i] = Flow[i] = inf;
  queue<int> q;
  q.push(s), dis[s] = 0;
  while (!q.empty()) {
    int u = q.front();
    q.pop(), vis[u] = 0;
    for (int i = first[u]; i != -1; i = last[i]) {
      int v = to[i];
      if (dis[u] + cost[i] < dis[v] && flow[i]) {
        dis[v] = dis[u] + cost[i], Flow[v] = min(Flow[u], (long long)flow[i]),
        pre[v] = u, pos[v] = i;
        if (!vis[v]) q.push(v), vis[v] = 1;
      }
    }
  }
  return dis[t] != inf;
}
long long MaxFlow, MinCost;
inline void solve(int s, int t) {
  while (spfa(s, t)) {
    MaxFlow += Flow[t], MinCost += Flow[t] * dis[t];
    for (int i = t; i != s; i = pre[i])
      flow[pos[i]] -= Flow[t], flow[pos[i] ^ 1] += Flow[t];
  }
}
}  // namespace MCMF
using MCMF::Add;
using MCMF::cost;
using MCMF::flow;
using MCMF::tot;
const int N = 350;
int n, m, a[N], id[N][2], pos[N][N], p[N];
struct node {
  int opt, x, y;
};
int main() {
  MCMF::init();
  n = read(), m = read();
  for (register int i = (1); i <= (n); i++) a[i] = read();
  int S = 1, cnt = 1;
  id[0][0] = ++cnt;
  for (register int i = (1); i <= (n); i++) id[i][0] = ++cnt, id[i][1] = ++cnt;
  int T = ++cnt;
  Add(S, id[0][0], m, 0);
  for (register int i = (1); i <= (n); i++) {
    pos[i][0] = tot + 1;
    Add(S, id[i][0], 1, 0), Add(id[i][1], T, 1, 0);
  }
  for (register int i = (0); i <= (n); i++)
    for (register int j = (i + 1); j <= (n); j++) {
      pos[i][j] = tot + 1;
      Add(id[i][0], id[j][1], 1, (a[i] == a[j] ? 0 : __builtin_popcount(a[j])));
    }
  MCMF::solve(S, T);
  vector<node> ans;
  int now = 0;
  for (register int i = (1); i <= (n); i++) {
    bool flag = 0;
    for (register int j = (1); j < (i); j++)
      if (!flow[pos[j][i]]) {
        if (cost[pos[j][i]]) ans.push_back((node){0, p[j], a[i]});
        ans.push_back((node){1, p[j]}), p[i] = p[j];
        flag = 1;
        break;
      }
    if (flag) continue;
    p[i] = ++now;
    ans.push_back((node){0, now, a[i]});
    ans.push_back((node){1, now});
  }
  printf("%d %lld\n", ((int)(ans).size()), MCMF::MinCost);
  for (auto i : ans) {
    if (i.opt == 0)
      printf("%c=%d\n", i.x + 'a' - 1, i.y);
    else
      printf("print(%c)\n", i.x + 'a' - 1);
  }
}