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 = 510;
const int inf = 1e9;
int n, m, a[N], v[N], op, ed;
pair<int, int> e[N][N];
int P(int a, int b) { return a * 2 + b; }
queue<int> q;
int pre[N], dis[N];
bool vis[N];
bool spfa() {
  while (!q.empty()) q.pop();
  for (int i = 1; i <= ed; ++i) dis[i] = inf, pre[i] = 0, vis[i] = 0;
  q.push(op);
  vis[op] = 1;
  dis[op] = 0;
  while (!q.empty()) {
    int u = q.front();
    vis[u] = 0;
    q.pop();
    for (int v = 1; v <= ed; ++v)
      if (e[u][v].first) {
        int s = dis[u] + e[u][v].second;
        if (s < dis[v]) {
          dis[v] = s;
          pre[v] = u;
          if (!vis[v]) q.push(v), vis[v] = 1;
        }
      }
  }
  return (dis[ed] < inf);
}
int sum = 0;
void flow() {
  while (spfa()) {
    sum += dis[ed];
    for (int i = ed; i != op; i = pre[i]) {
      e[pre[i]][i].first--;
      e[i][pre[i]].first++;
    }
  }
}
int mk[N], cnt;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i)
    for (int j = 0; j <= 30; ++j)
      if (a[i] >> j & 1) v[i]++;
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j) {
      int w = (a[i] == a[j]) ? 0 : v[j];
      e[P(j, 1)][P(i, 2)] = make_pair(1, w);
      e[P(i, 2)][P(j, 1)] = make_pair(0, -w);
    }
  for (int i = 1; i <= n; ++i) {
    e[P(i, 1)][P(0, 2)] = make_pair(1, v[i]);
    e[P(0, 2)][P(i, 1)] = make_pair(0, -v[i]);
  }
  op = P(n, 2) + 1, ed = P(n, 2) + 2;
  for (int i = 1; i <= n; ++i) e[op][P(i, 1)] = make_pair(1, 0);
  for (int i = 1; i <= n; ++i) e[P(i, 2)][ed] = make_pair(1, 0);
  e[P(0, 2)][ed] = make_pair(m, 0);
  flow();
  vector<pair<int, int> > ans;
  for (int i = 1; i <= n; ++i)
    for (int j = 0; j <= i - 1; ++j)
      if (e[P(i, 1)][P(j, 2)].first == 0) {
        if (j == 0)
          mk[i] = cnt++;
        else
          mk[i] = mk[j];
        if (j == 0 || a[i] != a[j]) ans.push_back(make_pair(mk[i], a[i]));
        ans.push_back(make_pair(mk[i], 0));
      }
  printf("%d %d\n", ((int)ans.size()), sum);
  for (int i = 0; i <= ((int)ans.size()) - 1; ++i)
    if (ans[i].second)
      printf("%c=%d\n", 'a' + ans[i].first, ans[i].second);
    else
      printf("print(%c)\n", ans[i].first + 'a');
}