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 = 255;
const int MAXM = 30;
const int MAX = 10000;
const int INF = -1U >> 1;
int arr[MAXN];
struct MinCostFlow {
  struct edge {
    int n, f, c;
    edge *next, *rev;
    edge(int _n, int _f, int _c, edge* _next)
        : n(_n), f(_f), c(_c), next(_next) {}
  };
  vector<edge*> edges;
  int addV() {
    edges.push_back((edge*)0);
    return edges.size() - 1;
  }
  edge* makeE(int s, int t, int f, int c) {
    return edges[s] = new edge(t, f, c, edges[s]);
  }
  void addE(int s, int t, int f, int c) {
    edge *e1 = makeE(s, t, f, c), *e2 = makeE(t, s, 0, -c);
    e1->rev = e2, e2->rev = e1;
  }
  void mcflow(int vs, int vt, int vr, int vn, int vm) {
    int n = edges.size();
    int cflow = 0, ccost = 0;
    vector<int> dist(n);
    vector<int> flow(n);
    vector<edge*> from(n);
    vector<bool> in(n);
    queue<int> que;
    while (1) {
      fill(dist.begin(), dist.end(), INF);
      fill(flow.begin(), flow.end(), 0);
      dist[vs] = 0;
      flow[vs] = INF;
      que.push(vs);
      while (!que.empty()) {
        int v = que.front();
        que.pop();
        in[v] = 0;
        for (edge* e = edges[v]; e; e = e->next)
          if (e->f) {
            int nc = dist[v] + e->c;
            if (nc < dist[e->n]) {
              dist[e->n] = nc;
              flow[e->n] = min(flow[v], e->f);
              from[e->n] = e;
              if (!in[e->n]) {
                que.push(e->n);
                in[e->n] = 1;
              }
            }
          }
      }
      if (!flow[vt]) break;
      int f = flow[vt];
      cflow += f;
      ccost += f * dist[vt];
      int cur = vt;
      while (cur != vs) {
        edge* e = from[cur];
        e->f -= f;
        e->rev->f += f;
        cur = e->rev->n;
      }
    }
    vector<int> var(vn);
    vector<pair<int, int> > ans;
    for (int i = 0; i < vm; i++) {
      int cur = vr;
      while (cur != vt) {
        for (edge* e = edges[cur]; e; e = e->next) {
          if (!e->f) {
            e->f++;
            if (e->n < vn) var[e->n] = i;
            cur = e->n;
            break;
          }
        }
      }
    }
    vector<int> num(vn, -1);
    for (int i = 0; i < vn; i++) {
      if (num[var[i]] != arr[i])
        ans.push_back(pair<int, int>(var[i], 0)), num[var[i]] = arr[i];
      ans.push_back(pair<int, int>(var[i], 1));
    }
    cout << ans.size() << ' ' << ccost + MAX * vn << '\n';
    int cnt = 0;
    for (int i = 0; i < ans.size(); i++) {
      if (!ans[i].second)
        cout << char(ans[i].first + 'a') << '=' << arr[cnt] << '\n';
      else {
        cout << "print(" << char(ans[i].first + 'a') << ")\n";
        cnt++;
      }
    }
  }
};
int n, m;
int main() {
  ios ::sync_with_stdio(0);
  if (fopen("input.txt", "r")) freopen("input.txt", "r", stdin);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> arr[i];
  MinCostFlow net;
  for (int i = 0; i < n + n; i++) net.addV();
  int vs = net.addV(), vt = net.addV(), vr = net.addV();
  net.addE(vs, vr, m, 0);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      if (arr[i] == arr[j])
        net.addE(i + n, j, 1, 0);
      else
        net.addE(i + n, j, 1, __builtin_popcount(arr[j]));
  for (int i = 0; i < n; i++) {
    net.addE(vr, i, 1, __builtin_popcount(arr[i]));
    net.addE(i, i + n, 1, -MAX);
  }
  for (int i = 0; i < m; i++) net.addE(vr, vt, 1, 0);
  for (int i = 0; i < n; i++) net.addE(i + n, vt, 1, 0);
  net.mcflow(vs, vt, vr, n, m);
  return 0;
}