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 INF = 1e9;
class Solver {
  int n1, n2;
  vector<vector<int> > scs;
  vector<vector<int> > cs;
  vector<int> p1, p2;

 public:
  Solver(int _n1, int _n2) : n1(_n1), n2(_n2), cs(n1, vector<int>(n2, INF)) {}
  void add(int a, int b, int c) { cs[a][b] = min(cs[a][b], c); }
  int solve() {
    scs = cs;
    p1.assign(n1, -1);
    p2.assign(n2, -1);
    int ans = 0;
    for (;; ans++) {
      vector<bool> red(n1, false);
      vector<int> d1(n1, INF), fr1(n1, -1);
      vector<int> d2(n2, INF), fr2(n2, -1);
      for (int i = 0; i < n1; i++)
        if (p1[i] < 0) d1[i] = 0;
      for (;;) {
        int minv = INF, mini = -1;
        for (int i = 0; i < n1; i++)
          if (!red[i] && d1[i] < minv) {
            minv = d1[i];
            mini = i;
          }
        if (mini < 0) break;
        red[mini] = true;
        for (int b = 0; b < n2; b++) {
          if (d2[b] > minv + cs[mini][b]) {
            d2[b] = minv + cs[mini][b];
            fr2[b] = mini;
          }
          if (p2[b] >= 0) {
            int nb = p2[b];
            int nd = minv + cs[mini][b] + cs[nb][b];
            if (nd < d1[nb]) {
              d1[nb] = nd;
              fr1[nb] = mini;
            }
          }
        }
      }
      int rminv = INF, rmini = -1;
      for (int i = 0; i < n2; i++)
        if (p2[i] < 0 && d2[i] < rminv) {
          rminv = d2[i];
          rmini = i;
        }
      if (rmini < 0) break;
      for (int a = 0; a < n1; a++)
        for (int b = 0; b < n2; b++)
          if (cs[a][b] < INF) {
            cs[a][b] += d1[a] - d2[b];
            assert(cs[a][b] >= 0);
          }
      for (int b = rmini; b >= 0;) {
        int a = fr2[b];
        assert(a >= 0);
        int nb = p1[a];
        p1[a] = b;
        p2[b] = a;
        b = nb;
      }
      for (int i = 0; i < n1; i++)
        if (p1[i] >= 0) assert(p2[p1[i]] == i);
      for (int i = 0; i < n2; i++)
        if (p2[i] >= 0) assert(p1[p2[i]] == i);
    }
    return ans;
  }
  int getp2(int x) { return p2[x]; }
};
string gset(int a, int val) {
  char buf[16];
  snprintf(buf, sizeof buf, "%d", val);
  return string(1, 'a' + a) + "=" + buf;
}
string gpr(int a) {
  return string("print(") + string(1, 'a' + a) + string(")");
}
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) >= 1) {
    vector<int> as(n);
    for (int i = 0; i < n; i++) scanf("%d", &as[i]);
    Solver s(n + m, n);
    for (int b = 0; b < n; b++) {
      for (int a = 0; a < b; a++)
        s.add(a, b, as[a] == as[b] ? 0 : __builtin_popcount(as[b]));
      for (int a = 0; a < m; a++) s.add(n + a, b, __builtin_popcount(as[b]));
    }
    assert(s.solve() == n);
    vector<int> fir(m, -1);
    vector<int> ne(n, -1);
    for (int b = 0; b < n; b++) {
      int p1 = s.getp2(b);
      assert(p1 >= 0);
      if (p1 < n)
        ne[p1] = b;
      else
        fir[p1 - n] = b;
    }
    vector<string> res;
    vector<int> cval(m, -1);
    int price = 0;
    for (int i = 0; i < m; i++)
      if (fir[i] >= 0) {
        res.push_back(gset(i, as[fir[i]]));
        price += __builtin_popcount(as[fir[i]]);
        cval[i] = fir[i];
      }
    for (int i = 0; i < n; i++) {
      int vid = -1;
      for (int i2 = 0; i2 < m; i2++)
        if (cval[i2] == i) {
          vid = i2;
          break;
        }
      assert(vid >= 0);
      res.push_back(gpr(vid));
      if (ne[i] >= 0) {
        if (as[i] != as[ne[i]]) {
          price += __builtin_popcount(as[ne[i]]);
          res.push_back(gset(vid, as[ne[i]]));
        }
        cval[vid] = ne[i];
      }
    }
    printf("%d %d\n", ((int)(res).size()), price);
    for (int i = 0; i < ((int)(res).size()); i++)
      printf("%s\n", res[i].c_str());
  }
  return 0;
}