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 = 550 + 5;
const int M = N * N;
const int inf = 0x3f3f3f3f;
template <class T>
inline void getint(T& num) {
  char c;
  bool flag = 0;
  num = 0;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') flag = 1;
  while (c >= '0' && c <= '9') {
    num = num * 10 + c - 48;
    c = getchar();
  }
  if (flag) num = -num;
}
int n, m, tot, St, Ed, st, ans, f;
int num[N], p[N][2], dis[N];
int cnt = 1, fir[N], tar[M], nxt[M];
int cap[M], cost[M];
int last[N], id[N], now[N];
vector<int> print[30];
bool vis[N], is[N];
string opt[N << 1];
inline void link(int a, int b, int w, int c) {
  tar[++cnt] = b, cap[cnt] = w, cost[cnt] = c;
  nxt[cnt] = fir[a], fir[a] = cnt;
  tar[++cnt] = a, cap[cnt] = 0, cost[cnt] = -c;
  nxt[cnt] = fir[b], fir[b] = cnt;
}
inline int one(int x) {
  int ret = 0;
  x = num[x];
  while (x) ret += x & 1, x >>= 1;
  return ret;
}
int aug(int x, int augco) {
  if (x == Ed) {
    ans += dis[St] * augco;
    return augco;
  }
  vis[x] = 1;
  int delta, flow = augco;
  for (int i = fir[x]; i; i = nxt[i])
    if (cap[i] > 0 && !vis[tar[i]])
      if (dis[x] == dis[tar[i]] + cost[i]) {
        delta = min(flow, cap[i]);
        delta = aug(tar[i], delta);
        cap[i] -= delta, cap[i ^ 1] += delta;
        flow -= delta;
        if (!flow) break;
      }
  return augco - flow;
}
inline int Max_flow() {
  memset(vis, 0, sizeof vis);
  int f = aug(St, inf);
  return f;
}
inline bool label() {
  int Min = inf;
  for (int i = 1; i <= tot; i++)
    if (vis[i])
      for (int j = fir[i]; j; j = nxt[j])
        if (cap[j] > 0 && !vis[tar[j]])
          Min = min(Min, dis[tar[j]] + cost[j] - dis[i]);
  if (Min == inf) return 0;
  for (int i = 1; i <= tot; i++)
    if (vis[i]) dis[i] += Min;
  return 1;
}
inline void bfs() {
  for (int i = 1; i <= n; i++) {
    int u = p[i][1];
    for (int j = fir[u]; j; j = nxt[j])
      if (cap[j] && is[tar[j]]) {
        last[i] = tar[j];
        break;
      }
  }
}
void dfs(int x, int id) {
  for (int i = 1; i <= n; i++)
    if (last[i] == x) {
      print[id].push_back(num[i]);
      return dfs(p[i][0], id);
    }
}
int main() {
  getint(n), getint(m);
  tot = m;
  for (int i = 1; i <= m; i++) is[i] = 1;
  for (int i = 1; i <= n; i++) {
    getint(num[i]);
    p[i][0] = ++tot, id[p[i][0]] = i;
    p[i][1] = ++tot, id[p[i][1]] = i;
    is[p[i][0]] = 1;
  }
  St = ++tot, Ed = ++tot;
  for (int i = 1; i <= m; i++) {
    link(St, i, 1, 0);
    for (int j = 1; j <= n; j++) link(i, p[j][1], 1, one(j));
  }
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      int c = num[i] == num[j] ? 0 : one(j);
      link(p[i][0], p[j][1], 1, c);
    }
  for (int i = 1; i <= n; i++) {
    link(St, p[i][0], 1, 0);
    link(p[i][1], Ed, 1, 0);
  }
  do {
    while (Max_flow())
      ;
  } while (label());
  bfs();
  for (int i = 1; i <= m; i++) dfs(i, i);
  int step = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (now[j] >= (int)print[j].size()) continue;
      if (print[j][now[j]] != num[i]) continue;
      if (!now[j] || print[j][now[j] - 1] != num[i]) {
        opt[++step] += j + 'a' - 1;
        opt[step] += '=';
        int val = num[i];
        string tep = "";
        while (val) tep += val % 10 + 48, val /= 10;
        int len = tep.size();
        for (int i = len - 1; i >= 0; i--) opt[step] += tep[i];
      }
      opt[++step] += "print(";
      opt[step] += j + 'a' - 1;
      opt[step] += ')';
      now[j]++;
      break;
    }
  }
  printf("%d %d\n", step, ans);
  for (int i = 1; i <= step; i++) cout << opt[i] << '\n';
}