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 inf = (int)1e9, mn = 600, mm = 600 * 600 * 2;
int L, C, s, s1, t, n, m, d[mn], last[mn], a[mn], b[mn];
int l, r, q[10000000], no[mn], top, sou;
bool f[mn];
int ne[mm], po[mm], fir[mn], vo[mm], we[mm], E;
void adde(int u, int v, int c, int w) {
  po[E] = v;
  ne[E] = fir[u];
  vo[E] = c;
  we[E] = w;
  fir[u] = E++;
}
void add(int u, int v, int c, int w) {
  adde(u, v, c, w);
  adde(v, u, 0, -w);
}
bool spfa(int s, int t) {
  for (int i = 1; i <= t; i++) d[i] = inf;
  d[q[l = r = 1] = s] = 0;
  for (f[s] = 1; l <= r; l++) {
    int u = q[l], g;
    for (int k = fir[u]; k; k = ne[k])
      if (vo[k] > 0 && d[u] + we[k] < d[po[k]]) {
        d[po[k]] = d[u] + we[k];
        last[po[k]] = k;
        if (!f[po[k]]) {
          f[po[k]] = 1;
          q[++r] = po[k];
        }
      }
    f[u] = 0;
  }
  return d[t] < 0;
}
int flow(int s, int t) {
  int vol = inf, ans = 0;
  for (int i = t; i != s; i = po[last[i] ^ 1]) vol = min(vol, vo[last[i]]);
  for (int i = t; i != s; i = po[last[i] ^ 1]) {
    vo[last[i]] -= vol;
    vo[last[i] ^ 1] += vol;
    ans += we[last[i]] * vol;
  }
  return ans;
}
int cost_flow() {
  int ans = 0;
  while (spfa(s, t)) ans += flow(s, t);
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    b[i] = __builtin_popcount(a[i]);
  }
  s = n + n + 1;
  s1 = s + 1;
  t = s1 + 1;
  E = 2;
  add(s, s1, m, 0);
  for (int i = 1; i <= n; i++)
    add(s1, i, 1, b[i]), add(i + n, t, 1, 0), add(i, i + n, 1, -10000);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) add(i + n, j, 1, (a[i] != a[j]) * b[j]);
  C = cost_flow() + 10000 * n;
  for (int i = 1; i <= n; i++) {
    sou = i;
    for (int k = fir[i]; k; k = ne[k])
      if (vo[k] && po[k] < n + i && po[k] > n) {
        sou = po[k] - n;
        break;
      }
    if (sou == i) {
      no[i] = top;
      L += 2;
      top++;
    } else {
      if (a[sou] == a[i])
        L++;
      else {
        L += 2;
      }
      no[i] = no[sou];
    }
  }
  cout << L << " " << C << endl;
  top = 0;
  memset(no, 0, sizeof no);
  for (int i = 1; i <= n; i++) {
    sou = i;
    for (int k = fir[i]; k; k = ne[k])
      if (vo[k] && po[k] < n + i && po[k] > n) {
        sou = po[k] - n;
        break;
      }
    if (sou == i) {
      no[i] = top;
      printf("%c=%d\n", top + 97, a[i]);
      printf("print(%c)\n", top + 97);
      top++;
    } else {
      if (a[sou] == a[i])
        printf("print(%c)\n", no[sou] + 97);
      else {
        printf("%c=%d\n", no[sou] + 97, a[i]);
        printf("print(%c)\n", no[sou] + 97);
      }
      no[i] = no[sou];
    }
  }
  return 0;
}