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 maxn = 810;
const int maxm = 100010;
const int inf = 100000;
using namespace std;
struct MCMF {
  int src, sink, e, n;
  int first[maxn];
  int cap[maxm], cost[maxm], v[maxm], next[maxm];
  void init() {
    e = 0;
    memset(first, -1, sizeof(first));
  }
  void add_edge(int a, int b, int c, int w) {
    cap[e] = c, cost[e] = w, v[e] = b, next[e] = first[a], first[a] = e++;
    cap[e] = 0, cost[e] = -w, v[e] = a, next[e] = first[b], first[b] = e++;
  }
  int d[maxn], pre[maxn], pos[maxn];
  bool vis[maxn];
  bool spfa(int s, int t) {
    memset(pre, -1, sizeof(pre));
    memset(vis, 0, sizeof(vis));
    queue<int> q;
    for (int i = 0; i <= n; i++) d[i] = inf;
    q.push(s);
    pre[s] = s;
    d[s] = 0;
    vis[s] = 1;
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      vis[u] = 0;
      for (int i = first[u]; i != -1; i = next[i]) {
        if (cap[i] > 0 && d[u] + cost[i] < d[v[i]]) {
          d[v[i]] = d[u] + cost[i];
          pre[v[i]] = u;
          pos[v[i]] = i;
          if (!vis[v[i]]) vis[v[i]] = 1, q.push(v[i]);
        }
      }
    }
    if (d[t] > 0) return 0;
    return pre[t] != -1;
  }
  int Mincost, Maxflow;
  int MincostFlow(int s, int t, int nn) {
    Mincost = 0, Maxflow = 0, n = nn;
    while (spfa(s, t)) {
      int min_f = inf;
      for (int i = t; i != s; i = pre[i])
        if (cap[pos[i]] < min_f) min_f = cap[pos[i]];
      Mincost += d[t] * min_f;
      Maxflow += d[t];
      for (int i = t; i != s; i = pre[i]) {
        cap[pos[i]] -= min_f;
        cap[pos[i] ^ 1] += min_f;
      }
    }
    return Mincost;
  }
} solver;
int bitcount(int x) {
  int ret = 0;
  while (x) {
    if (x & 1) ret++;
    x >>= 1;
  }
  return ret;
}
int a[300], b[300], v[300], res[300], now[300];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int S = 0, T = 3 * n + 1;
  solver.init();
  solver.add_edge(S, 1, m, 0);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    solver.add_edge(i, i + n, 1, bitcount(a[i]));
    solver.add_edge(i + n, i + 2 * n, 1, -inf);
    solver.add_edge(i + 2 * n, T, 1, 0);
    if (i < n) {
      solver.add_edge(i + 2 * n, i + 1, 1, 0);
      solver.add_edge(i, i + 1, inf, 0);
    }
  }
  for (int i = 1, j; i <= n; i++) {
    for (j = i + 1; j <= n && a[i] - a[j]; j++)
      ;
    res[i] = -1;
    if (j <= n)
      res[i] = solver.e, solver.add_edge(i + 2 * n, j + n, 1, 0), v[i] = j;
  }
  int ans1 = solver.MincostFlow(S, T, T), ans2 = n;
  for (int i = 1; i <= n; i++)
    if (res[i] != -1) {
      if (!solver.cap[res[i]]) ans2--;
    }
  printf("%d %d\n", n + ans2, (ans1 % inf + inf) % inf);
  for (int i = 1; i <= n; i++) {
    int w = now[i];
    if (!w) {
      for (w = 97; b[w]; w++)
        ;
      b[w] = 1;
      printf("%c=%d\n", w, a[i]);
    }
    printf("print(%c)\n", w);
    if (res[i] != -1 && !solver.cap[res[i]])
      now[v[i]] = w;
    else
      b[w] = 0;
  }
  return 0;
}