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;
int n, m, g, A[505], vis[505], fa[505], cmt;
char var[505];
int fir[505], tar[1000005], cap[1000005], cst[1000005], nex[1000005], cnt = 1;
long long d[505];
queue<int> q;
int bit(int a) {
  int ans = 0;
  for (; a; a -= a & -a) ans++;
  return ans;
}
void add(int a, int b, int c, int d) {
  ++cnt;
  tar[cnt] = b;
  cap[cnt] = c;
  cst[cnt] = d;
  nex[cnt] = fir[a];
  fir[a] = cnt;
  if (c) add(b, a, 0, -d);
}
long long SPFA(int s, int t) {
  for (int i = 1; i <= g; i++) d[i] = 0x3f3f3f3f;
  d[t] = 0;
  while (!q.empty()) q.pop();
  q.push(t);
  vis[t] = 1;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int i = fir[x]; i; i = nex[i]) {
      if (cap[i ^ 1]) {
        int v = tar[i];
        if (d[x] + cst[i ^ 1] < d[v]) {
          d[v] = d[x] + cst[i ^ 1];
          fa[v] = i ^ 1;
          if (!vis[v]) q.push(v);
          vis[v] = 1;
        }
      }
    }
    vis[x] = 0;
  }
  return d[s];
}
long long sap(int s, int t) {
  long long ans = 1ll * n * 0x3f3f3f3f;
  while (SPFA(s, t) < 0) {
    for (int i = s; i != t; i = tar[fa[i]]) {
      cap[fa[i]]--;
      cap[fa[i] ^ 1]++;
    }
    ans += d[s];
  }
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  add(1, 2, m, 0);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
    add(i + 3, i + n + 3, 1, -0x3f3f3f3f);
    add(2, i + 3, 1, bit(A[i]));
    add(i + n + 3, 3, 1, 0);
  }
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (A[i] == A[j])
        add(i + n + 3, j + 3, 1, 0);
      else
        add(i + n + 3, j + 3, 1, bit(A[j]));
  g = 2 * n + 3;
  long long ans = sap(1, 3), ans1 = 0;
  for (int i = 4; i <= n + 3; i++) {
    for (int j = fir[i]; j; j = nex[j]) {
      int v = tar[j];
      if (v == i + n + 3) continue;
      if (v != 2) v -= n;
      if (cap[j] == 1)
        if (v == 2 || A[v - 3] != A[i - 3]) ans1++;
    }
  }
  ans1 += n;
  printf("%d %d\n", int(ans1), int(ans));
  for (int i = 4; i <= n + 3; i++) {
    for (int j = fir[i]; j; j = nex[j]) {
      int v = tar[j];
      if (v == i + n + 3) continue;
      if (v != 2) v -= n;
      if (cap[j] == 1) {
        if (v == 2) {
          printf("%c=%d\n", 'a' + cmt, A[i - 3]);
          var[i] = 'a' + cmt;
          cmt++;
        } else {
          var[i] = var[v];
          if (A[v - 3] != A[i - 3]) printf("%c=%d\n", var[v], A[i - 3]);
        }
        printf("print(%c)\n", var[i]);
      }
    }
  }
}