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 = 310;
const int INF = 0x3f3f3f3f;
int nx, ny;
int g[N][N];
int linker[N], lx[N], ly[N];
int slack[N];
bool visx[N], visy[N];
bool DFS(int x) {
  visx[x] = true;
  for (int y = 0; y < ny; y++) {
    if (visy[y]) continue;
    int tmp = lx[x] + ly[y] - g[x][y];
    if (tmp == 0) {
      visy[y] = true;
      if (linker[y] == -1 || DFS(linker[y])) {
        linker[y] = x;
        return true;
      }
    } else if (slack[y] > tmp)
      slack[y] = tmp;
  }
  return false;
}
int KM() {
  memset(linker, -1, sizeof(linker));
  memset(ly, 0, sizeof(ly));
  for (int i = 0; i < nx; i++) {
    lx[i] = -INF;
    for (int j = 0; j < ny; j++)
      if (g[i][j] > lx[i]) lx[i] = g[i][j];
  }
  for (int x = 0; x < nx; x++) {
    for (int i = 0; i < ny; i++) slack[i] = INF;
    while (true) {
      memset(visx, false, sizeof(visx));
      memset(visy, false, sizeof(visy));
      if (DFS(x)) break;
      int d = INF;
      for (int i = 0; i < ny; i++)
        if (!visy[i] && d > slack[i]) d = slack[i];
      for (int i = 0; i < nx; i++)
        if (visx[i]) lx[i] -= d;
      for (int i = 0; i < ny; i++) {
        if (visy[i])
          ly[i] += d;
        else
          slack[i] -= d;
      }
    }
  }
  int res = 0;
  for (int i = 0; i < ny; i++)
    if (linker[i] != -1) res += g[linker[i]][i];
  return res;
}
int n, m;
int a[N];
int f(int x) {
  int cnt = 0;
  while (x) {
    cnt += x & 1;
    x >>= 1;
  }
  return cnt;
}
int used[N];
int val[N];
vector<pair<int, int> > out;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  nx = n;
  ny = n + m;
  for (int i = 0; i < nx; ++i)
    for (int j = 0; j < ny; ++j) g[i][j] = -INF;
  for (int i = 0; i < m; ++i)
    for (int j = 0; j < n; ++j) g[j][n + i] = -f(a[j]);
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j)
      if (a[i] != a[j])
        g[j][i] = -f(a[j]);
      else
        g[j][i] = 0;
  int ans = -KM();
  memset(used, -1, sizeof(used));
  for (int i = 0; i < n; ++i) {
    if (used[i] == -1) {
      for (int j = 0; j < m; ++j)
        if (linker[j + n] == i) {
          out.push_back(pair<int, int>(j, a[i]));
          out.push_back(pair<int, int>(-1, j));
          val[j] = a[i];
          if (linker[i] != -1) used[linker[i]] = j;
          break;
        }
    } else {
      int tx = used[i];
      if (val[tx] == a[i])
        out.push_back(pair<int, int>(-1, tx));
      else {
        out.push_back(pair<int, int>(tx, a[i]));
        out.push_back(pair<int, int>(-1, tx));
      }
      val[tx] = a[i];
      if (linker[i] != -1) used[linker[i]] = tx;
    }
  }
  printf("%d %d\n", (int)out.size(), ans);
  for (int i = 0; i < (int)out.size(); ++i) {
    pair<int, int> tmp = out[i];
    if (tmp.first == -1) {
      printf("print(%c)\n", (char)(tmp.second + 'a'));
    } else {
      printf("%c=%d\n", (char)(tmp.first + 'a'), tmp.second);
    }
  }
  return 0;
}