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 DIM = 605;
const double INF = 10005;
int arr[DIM], cap[DIM][DIM], dst[DIM], fth[DIM], val[DIM];
pair<char, int> ans[DIM];
bitset<DIM> inq;
set<int> mst;
deque<int> que;
vector<pair<int, int>> edg[DIM];
void add(int x, int y, int c, int d) {
  cap[x][y] += c;
  edg[x].push_back(make_pair(y, d));
  edg[y].push_back(make_pair(x, -d));
}
bool bf(int s, int d) {
  que.assign(1, s);
  inq[s] = true;
  fill(dst, dst + DIM, INF);
  dst[s] = 0;
  for (; que.size(); inq[que.front()] = false, que.pop_front()) {
    int x = que.front();
    for (pair<int, int> it : edg[x]) {
      int y = it.first, ds = it.second;
      if (cap[x][y] and dst[y] > dst[x] + ds) {
        dst[y] = dst[x] + ds;
        fth[y] = x;
        if (!inq[y] and y != d) inq[y] = true, que.push_back(y);
      }
    }
  }
  return dst[d] != INF;
}
int main(void) {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    mst.insert(arr[i]);
  }
  int sr1 = DIM - 1, sr2 = DIM - 2, ds = DIM - 3;
  add(sr1, sr2, min(m, (int)mst.size()), 0);
  for (int i = 1; i <= n; ++i) {
    add(sr2, i * 2 - 1, 1, __builtin_popcount(arr[i]));
    add(i * 2 - 1, i * 2, 1, -INF);
    add(i * 2, ds, 1, 0);
    for (int j = 1; j <= i - 1; ++j)
      add(j * 2, i * 2 - 1, 1,
          arr[i] == arr[j] ? 0 : __builtin_popcount(arr[i]));
  }
  while (bf(sr1, ds)) {
    int mn = INF;
    for (int y = ds; y != sr1; y = fth[y]) mn = min(mn, cap[fth[y]][y]);
    for (int y = ds; y != sr1; y = fth[y])
      cap[fth[y]][y] -= mn, cap[y][fth[y]] += mn;
  }
  int mnm = 0, sum = 0;
  for (int i = 1, nr = 0; i <= n; ++i) {
    bool ok = false;
    for (int j = 1; j <= i - 1; ++j) {
      if (cap[j * 2][i * 2 - 1]) continue;
      if (arr[j] == arr[i]) ok = true;
      val[i] = val[j];
    }
    if (val[i] == 0) val[i] = ++nr;
    if (!ok)
      ans[++mnm] = make_pair(val[i] + 'a' - 1, arr[i]),
      sum += __builtin_popcount(arr[i]);
    ans[++mnm] = make_pair(val[i] + 'a' - 1, 0);
  }
  cout << mnm << " " << sum << "\n";
  for (int i = 1; i <= mnm; ++i) {
    if (ans[i].second == 0)
      cout << "print(" << ans[i].first << ")\n";
    else
      cout << ans[i].first << "=" << ans[i].second << "\n";
  }
  return 0;
}