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 MAXN = 305;
const long long INFTY = 1LL << 60;
int N, M;
int A[MAXN];
int var[MAXN];
vector<pair<int, pair<int, int> > > op;
long long cost[MAXN][MAXN];
int L[MAXN];
int R[MAXN];
long long U[MAXN];
long long V[MAXN];
long long dist[MAXN];
int dad[MAXN];
bool vis[MAXN];
long long hungarian(int n) {
  for (int i = 0; i < n; i++) {
    U[i] = cost[i][0];
    for (int j = 1; j < n; j++) U[i] = min(U[i], cost[i][j]);
  }
  for (int j = 0; j < n; j++) {
    V[j] = cost[0][j] - U[0];
    for (int i = 1; i < n; i++) V[j] = min(V[j], cost[i][j] - U[i]);
  }
  memset(L, -1, sizeof(L));
  memset(R, -1, sizeof(R));
  int cnt = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (R[j] != -1) continue;
      if (cost[i][j] == U[i] + V[j]) {
        L[i] = j;
        R[j] = i;
        cnt++;
        break;
      }
    }
  while (cnt < n) {
    int s = 0;
    while (s < n && L[s] != -1) s++;
    for (int j = 0; j < n; j++) dist[j] = cost[s][j] - U[s] - V[j];
    memset(dad, -1, sizeof(dad));
    memset(vis, 0, sizeof(vis));
    int t = 0;
    while (true) {
      t = -1;
      for (int j = 0; j < n; j++)
        if (!vis[j] && (t == -1 || dist[j] < dist[t])) t = j;
      vis[t] = 1;
      if (R[t] == -1) break;
      for (int j = 0; j < n; j++)
        if (!vis[j]) {
          long long d = dist[t] + cost[R[t]][j] - U[R[t]] - V[j];
          if (dist[j] > d) {
            dist[j] = d;
            dad[j] = t;
          }
        }
    }
    for (int j = 0; j < n; j++)
      if (j != t && vis[j]) {
        V[j] += dist[j] - dist[t];
        U[R[j]] -= dist[j] - dist[t];
      }
    U[s] += dist[t];
    while (dad[t] >= 0) {
      int t1 = dad[t];
      R[t] = R[t1];
      L[R[t]] = t;
      t = t1;
    }
    R[t] = s;
    L[s] = t;
    cnt++;
  }
  long long total = 0;
  for (int i = 0; i < n; i++) total += cost[i][L[i]];
  return total;
}
int set_bits(int x) {
  int ret = 0;
  for (; x > 0; x -= x & -x) ret++;
  return ret;
}
int main() {
  ios::sync_with_stdio(0);
  for (int i = 0; i < MAXN; i++)
    for (int j = 0; j < MAXN; j++) cost[i][j] = INFTY;
  cin >> N >> M;
  for (int i = 0; i < N; i++) cin >> A[i];
  for (int i = 0; i < N; i++) {
    int x = set_bits(A[i]);
    for (int k = 0; k < M; k++) cost[N + k][i] = x;
    for (int j = 0; j < i; j++) cost[j][i] = (A[i] == A[j]) ? 0 : x;
  }
  for (int i = N; i < N + M; i++)
    for (int j = 0; j < N + M; j++) cost[j][i] = 0;
  long long ans = hungarian(N + M);
  for (int i = 0; i < N; i++) {
    int left = R[i];
    var[i] = (left >= N) ? (left - N) : var[left];
    if (left >= N || A[left] != A[i])
      op.push_back(make_pair(0, make_pair(var[i], A[i])));
    op.push_back(make_pair(1, make_pair(var[i], -1)));
  }
  cout << op.size() << " " << ans << "\n";
  for (int i = 0; i < op.size(); i++) {
    if (op[i].first == 0)
      cout << (char)('a' + op[i].second.first) << "=" << op[i].second.second
           << "\n";
    else
      cout << "print(" << (char)('a' + op[i].second.first) << ")\n";
  }
  return 0;
}