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>
const long long INF = 4e18L + 1;
const int IINF = 2e9 + 1;
const int limit = 1048576;
using namespace std;
namespace mincost {
const int V = 2010, E = 2001000, inf = 0x20202020;
int q[V * V], vis[V], fst[V], pre[V], nxt[E], y[E], f[E], S, T, flow, tot, tn;
long double cost, c[E], dis[V];
void init(int s, int t, int Tn) {
  tot = 1;
  tn = Tn;
  for (long long i = (long long)0; i < (long long)tn; i++) fst[i] = 0;
  S = s;
  T = t;
}
void add(int u, int v, int ff, long double cc) {
  tot++;
  y[tot] = v;
  nxt[tot] = fst[u];
  f[tot] = ff;
  c[tot] = cc;
  fst[u] = tot;
  tot++;
  y[tot] = u;
  nxt[tot] = fst[v];
  f[tot] = 0;
  c[tot] = -cc;
  fst[v] = tot;
}
bool spfa() {
  for (long long i = (long long)0; i < (long long)tn; i++)
    dis[i] = inf, vis[i] = 0, pre[i] = 0;
  dis[S] = 0;
  q[0] = S;
  vis[S] = 1;
  int t = 1;
  for (long long i = (long long)0; i < (long long)t; i++) {
    int u = q[i];
    for (int j = fst[u]; j; j = nxt[j]) {
      int v = y[j];
      if (f[j] && dis[v] > dis[u] + c[j]) {
        dis[v] = dis[u] + c[j];
        pre[v] = j;
        if (!vis[v]) vis[v] = 1, q[t++] = v;
      }
    }
    vis[u] = 0;
  }
  return dis[T] != inf;
}
void augment() {
  int p = T, _f = inf;
  while (pre[p]) _f = min(_f, f[pre[p]]), p = y[pre[p] ^ 1];
  flow += _f;
  cost += 1.0 * _f * dis[T];
  p = T;
  while (pre[p]) f[pre[p]] -= _f, f[pre[p] ^ 1] += _f, p = y[pre[p] ^ 1];
}
void solve() {
  flow = 0, cost = 0;
  while (spfa()) {
    augment();
  }
}
}  // namespace mincost
using namespace mincost;
string mitoa(int i) {
  char buff[20];
  sprintf(buff, "%d", i);
  return string(buff);
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> V(n);
  for (auto& el : V) cin >> el;
  int s = 0, t = 2 * n + 2;
  init(s, t, t + 1);
  for (int i = 2; i < t; i += 2) add(i, i + 1, 1, -1000);
  add(0, 1, m, 0);
  add(1, t, m, 0);
  for (int i = 0; 2 * i + 2 < t; i++)
    add(1, 2 * i + 2, 1, __builtin_popcount(V[i]));
  for (int i = 0; 2 * i + 2 < t; i++) add(2 * i + 3, t, 1, 0);
  for (int i = 0; i < n - 1; i++)
    for (int j = i + 1; j < t; j++) {
      if (V[i] == V[j])
        add(2 * i + 3, 2 * j + 2, 1, 0);
      else
        add(2 * i + 3, 2 * j + 2, 1, __builtin_popcount(V[j]));
    }
  solve();
  cost += n * 1000;
  int akt = 0;
  vector<int> Odp(n), War(n, -1);
  vector<string> Ans;
  for (int i = 2; i < t; i += 2) {
    int nr = -1;
    for (int j = 2; j < tot; j += 2)
      if (y[j] == i && f[j] == 0 && y[j + 1] < y[j]) nr = y[j + 1];
    if (nr == 1) {
      Odp[i / 2 - 1] = akt;
      akt++;
    } else
      Odp[i / 2 - 1] = Odp[nr / 2 - 1];
  }
  for (int i = 0; i < n; i++) {
    int nr_k = Odp[i];
    char c = 'a' + nr_k;
    if (War[nr_k] != V[i]) {
      string s;
      s += c;
      s += '=';
      s += mitoa(V[i]);
      War[nr_k] = V[i];
      Ans.push_back(s);
    }
    string s = "print(";
    s += c;
    s += ")";
    Ans.push_back(s);
  }
  cout << Ans.size() << " " << cost << "\n";
  for (auto el : Ans) cout << el << "\n";
  return 0;
}