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 = 1000;
const int INF = (int)1e9;
int n, m, a[N], d[N], p[N], cap[N][N], wei[N][N];
bool s[N];
string var[N];
vector<int> q;
vector<int> g[N];
vector<string> res;
int get(int x) { return __builtin_popcount(x); }
void add(int x, int y, int c, int w) {
  cap[x][y] = c;
  cap[y][x] = 0;
  wei[x][y] = w;
  wei[y][x] = -w;
  g[x].push_back(y);
  g[y].push_back(x);
}
string conv(int x) {
  string ret = "";
  while (x > 0) {
    ret += (char)(x % 10 + '0');
    x /= 10;
  }
  reverse(ret.begin(), ret.end());
  return ret;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n + m; i++) {
    add(0, i, 1, 0);
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 0; j < n; j++) {
      add(i, n + m + j + 1, 1, get(a[j]));
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      add(m + i + 1, n + m + j + 1, 1, (a[i] == a[j]) ? 0 : get(a[j]));
    }
  }
  for (int i = n + m + 1; i <= n + m + n; i++) {
    add(i, 2 * n + m + 1, 1, 0);
  }
  int t = 2 * n + m + 1;
  int ans = 0;
  for (int k = 0; k < n; k++) {
    for (int i = 0; i <= t; i++) {
      d[i] = INF;
      s[i] = false;
    }
    d[0] = 0;
    s[0] = true;
    q.push_back(0);
    for (int i = 0; i < q.size(); i++) {
      int x = q[i];
      s[x] = false;
      for (int j = 0; j < g[x].size(); j++) {
        int y = g[x][j];
        if (d[y] > d[x] + wei[x][y] && cap[x][y] > 0) {
          p[y] = x;
          d[y] = d[x] + wei[x][y];
          if (!s[y]) {
            s[y] = true;
            q.push_back(y);
          }
        }
      }
    }
    int x = t;
    while (x != 0) {
      int y = p[x];
      cap[y][x]--;
      cap[x][y]++;
      ans += wei[y][x];
      x = y;
    }
    q.clear();
  }
  for (int i = n + m + 1; i <= n + m + n; i++) {
    int from = -1;
    for (int j = 1; j <= n + m; j++) {
      if (cap[i][j] != 0) {
        from = j;
        break;
      }
    }
    if (from <= m) {
      var[i] = "";
      var[i] += (char)('a' + from - 1);
      res.push_back(var[i] + "=" + conv(a[i - n - m - 1]));
    } else {
      var[i] = var[from + n];
      if (a[i - n - m - 1] != a[from - m - 1]) {
        res.push_back(var[i] + "=" + conv(a[i - n - m - 1]));
      }
    }
    res.push_back("print(" + var[i] + ")");
  }
  printf("%d %d\n", res.size(), ans);
  for (int i = 0; i < res.size(); i++) {
    printf("%s\n", res[i].c_str());
  }
  return 0;
}