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 = 3 * 250 + 100;
const int maxm = 2 * 250 * 250 + 100;
const int inf = 10000;
const int INF = 0x3f3f3f3f;
int n, m;
int a[maxn];
struct MCMF {
  int ss, tt, dis[maxn], pre[maxn];
  int first[maxn], from[maxm * 2], des[maxm * 2], nxt[maxm * 2], cost[maxm * 2],
      flow[maxm * 2], tot;
  bool in[maxn];
  MCMF() { clear(); }
  void clear() {
    tot = -1;
    memset(first, -1, sizeof first);
  }
  void init(vector<tuple<int, int, int, int> > E) {
    for (auto edge : E) {
      int u, v, f, c;
      tie(u, v, f, c) = edge;
      addEdge(u, v, f, c);
    }
  }
  void __addE(int x, int y, int f, int c) {
    tot++;
    from[tot] = x;
    des[tot] = y;
    flow[tot] = f;
    cost[tot] = c;
    nxt[tot] = first[x];
    first[x] = tot;
  }
  inline void addEdge(int x, int y, int f, int c) {
    __addE(x, y, f, c);
    __addE(y, x, 0, -c);
  }
  bool spfa() {
    memset(in, 0, sizeof in);
    for (int i = 0; i < maxn; i++) dis[i] = INF;
    memset(pre, -1, sizeof pre);
    dis[ss] = 0;
    in[ss] = 1;
    queue<int> Q;
    Q.push(ss);
    while (!Q.empty()) {
      int q = Q.front();
      Q.pop();
      in[q] = 0;
      for (int t = first[q]; t != -1; t = nxt[t]) {
        int v = des[t], len = cost[t], cx = flow[t];
        if (cx && dis[v] > dis[q] + len) {
          dis[v] = dis[q] + len;
          pre[v] = t;
          if (!in[v]) {
            Q.push(v);
            in[v] = 1;
          }
        }
      }
    }
    return pre[tt] != -1 && dis[tt] < 0;
  }
  pair<int, int> run(int s, int t) {
    ss = s;
    tt = t;
    int totflow = 0, totcost = 0, nowflow = 0, nowcost = 0;
    while (spfa()) {
      nowcost = 0;
      nowflow = INF;
      int now = pre[tt];
      while (now != -1) {
        nowflow = min(nowflow, flow[now]);
        now = pre[from[now]];
      }
      now = pre[tt];
      while (now != -1) {
        flow[now] -= nowflow;
        flow[now ^ 1] += nowflow;
        nowcost += cost[now];
        now = pre[from[now]];
      }
      nowcost *= nowflow;
      totflow += nowflow;
      totcost += nowcost;
    }
    return make_pair(totflow, totcost);
  }
  int id[maxn];
  int argvalue[maxn];
  vector<string> ans;
  void copy(int argid, int val) {
    stringstream stm;
    stm << (char)('a' + argid - 1) << "=" << val;
    ans.push_back(stm.str());
  }
  void print(int argid) {
    stringstream stm;
    stm << "print(" << (char)('a' + argid - 1) << ")";
    ans.push_back(stm.str());
  }
  void output(int cost) {
    int argid = 0;
    for (int i = 1; i <= n; i++) {
      int A = 2 * i - 1;
      int B = 2 * i;
      if (id[A] == 0) {
        argid++;
        id[A] = argid;
        copy(argid, a[i]);
        print(argid);
        argvalue[argid] = a[i];
      } else {
        int temp_value = argvalue[id[A]];
        if (temp_value != a[i]) {
          copy(id[A], a[i]);
          argvalue[id[A]] = a[i];
        }
        print(id[A]);
      }
      for (int t = first[B]; t != -1; t = nxt[t]) {
        int v = des[t];
        int f = flow[t];
        if (f || v == A) {
          continue;
        }
        if (v == 2 * n + 3)
          break;
        else {
          id[v] = id[A];
        }
      }
    }
    cout << ans.size() << " " << cost << endl;
    for (auto str : ans) {
      cout << str << endl;
    }
  }
} mcmf;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  vector<tuple<int, int, int, int> > E(0);
  int SS = 2 * n + 1;
  int S = 2 * n + 2;
  int T = 2 * n + 3;
  E.push_back(make_tuple(SS, S, m, 0));
  for (int i = 1; i <= n; i++) {
    int A = 2 * i - 1;
    int B = 2 * i;
    E.push_back(make_tuple(A, B, 1, -inf));
    E.push_back(make_tuple(S, A, 1, __builtin_popcount(a[i])));
    E.push_back(make_tuple(B, T, 1, 0));
    for (int j = i + 1; j <= n; j++) {
      int AA = 2 * j - 1;
      int BB = 2 * j;
      if (a[i] == a[j]) {
        E.push_back(make_tuple(B, AA, 1, 0));
      } else {
        E.push_back(make_tuple(B, AA, 1, __builtin_popcount(a[j])));
      }
    }
  }
  mcmf.init(E);
  pair<int, int> ans = mcmf.run(SS, T);
  mcmf.output((ans.second % inf + inf) % inf);
  return 0;
}