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 modn = 1000000007;
inline long long mod(long long x) { return x % modn; }
const int N = 312 * 312 + 11234, M = (321 * 321 + 1123456) * 2;
typedef int val;
typedef int num;
int es[N], to[M], nx[M], en, pai[N];
val fl[M], cp[M];
num cs[M], d[N];
const num eps = 0;
int seen[N], tempo;
int qu[N];
num tot;
val spfa(int s, int t) {
  tempo++;
  int a = 0, b = 0;
  for (int i = 0; i < N; i++) d[i] = numeric_limits<num>::max();
  d[s] = 0;
  qu[b++] = s;
  seen[s] = tempo;
  while (a != b) {
    int u = qu[a++];
    if (a == N) a = 0;
    seen[u] = 0;
    for (int e = es[u]; e != -1; e = nx[e])
      if (cp[e] - fl[e] > val(0) && d[u] + cs[e] < d[to[e]] - eps) {
        d[to[e]] = d[u] + cs[e];
        pai[to[e]] = e ^ 1;
        if (seen[to[e]] < tempo) {
          seen[to[e]] = tempo;
          qu[b++] = to[e];
          if (b == N) b = 0;
        }
      }
  }
  if (d[t] == numeric_limits<num>::max()) return false;
  val mx = numeric_limits<val>::max();
  for (int u = t; u != s; u = to[pai[u]])
    mx = min(mx, cp[pai[u] ^ 1] - fl[pai[u] ^ 1]);
  tot += d[t] * val(mx);
  for (int u = t; u != s; u = to[pai[u]])
    fl[pai[u]] -= mx, fl[pai[u] ^ 1] += mx;
  return mx;
}
void init(int n) {
  en = 0;
  memset(es, -1, sizeof(int) * n);
}
val flow;
num mncost(int s, int t) {
  tot = 0;
  flow = 0;
  while (val a = spfa(s, t)) flow += a;
  return tot;
}
void add_edge(int u, int v, val c, num s) {
  fl[en] = 0;
  cp[en] = c;
  to[en] = v;
  nx[en] = es[u];
  cs[en] = s;
  es[u] = en++;
  fl[en] = 0;
  cp[en] = 0;
  to[en] = u;
  nx[en] = es[v];
  cs[en] = -s;
  es[v] = en++;
}
int X = -1000000;
int a[N], b[N];
vector<char> vars[N];
int main() {
  int i, j, n, m;
  scanf("%d %d", &n, &m);
  init(N);
  for (i = 0; i < n; i++) scanf("%d", &a[i]), b[i] = a[i];
  sort(b, b + n);
  int bn = unique(b, b + n) - b;
  for (i = 0; i < n; i++) a[i] = lower_bound(b, b + bn, a[i]) - b;
  int s = 0, t = 1;
  int change = 2;
  int collect = change + n + 2;
  int dispense = collect + n + 2;
  add_edge(s, change, m, 0);
  for (i = 0; i < n; i++) {
    add_edge(change + i, collect + i, m, __builtin_popcount(b[a[i]]));
    add_edge(collect + i, t, 1, X);
    if (i < n - 1) {
      add_edge(change + i, change + i + 1, m, 0);
      add_edge(s, dispense + i, 1, 0);
      add_edge(dispense + i, change + i + 1, 1, 0);
      for (j = i + 1; j < n; j++)
        if (a[i] == a[j]) {
          add_edge(dispense + i, collect + j, 1, 0);
          add_edge(collect + i, collect + j, m, 0);
          break;
        }
    } else {
      add_edge(change + i, t, m, 0);
    }
  }
  int val = mncost(s, t);
  vector<char> to_change;
  for (i = 0; i < m; i++) to_change.push_back('a' + i);
  int ct = 0;
  for (i = 0; i < n; i++) {
    for (int e = es[change + i]; e != -1; e = nx[e]) {
      if (fl[e] <= 0) continue;
      if (to[e] == t) {
      } else if (to[e] == change + i + 1) {
      } else {
        for (int x = 0; x < fl[e]; x++) {
          vars[a[to[e] - collect]].push_back(to_change.back());
          ct++;
          to_change.pop_back();
        }
      }
    }
    ct++;
    if (i < n - 1) {
      for (int e = es[dispense + i]; e != -1; e = nx[e]) {
        if (fl[e] <= 0) continue;
        if (to[e] == change + i + 1) {
          to_change.push_back(vars[a[i]].back());
          vars[a[i]].pop_back();
        }
      }
    }
  }
  to_change.clear();
  for (i = 0; i < bn; i++) vars[i].clear();
  for (i = 0; i < m; i++) to_change.push_back('a' + i);
  printf("%d %d\n", ct, val - X * n);
  for (i = 0; i < n; i++) {
    for (int e = es[change + i]; e != -1; e = nx[e]) {
      if (fl[e] <= 0) continue;
      if (to[e] == t) {
      } else if (to[e] == change + i + 1) {
      } else {
        for (int x = 0; x < fl[e]; x++) {
          vars[a[to[e] - collect]].push_back(to_change.back());
          printf("%c=%d\n", to_change.back(), b[a[to[e] - collect]]);
          to_change.pop_back();
        }
      }
    }
    printf("print(%c)\n", vars[a[i]].back());
    if (i < n - 1) {
      for (int e = es[dispense + i]; e != -1; e = nx[e]) {
        if (fl[e] <= 0) continue;
        if (to[e] == change + i + 1) {
          to_change.push_back(vars[a[i]].back());
          vars[a[i]].pop_back();
        }
      }
    }
  }
}