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;
struct Bipartite {
  int size;
  vector<int> conn;
  vector<int> rev;
  Bipartite(int nsize) {
    size = nsize;
    conn.resize(size * size, 1000000007);
  }
  int I(int y, int x) { return y * size + x; }
  int match() {
    vector<int> v[2] = {vector<int>(size, 0), vector<int>(size, 0)};
    vector<int> revfrom(size, -1);
    rev.clear();
    rev.resize(size, -1);
    vector<bool> taken[2] = {vector<bool>(size, false),
                             vector<bool>(size, false)};
    for (int TAKEN = 0; TAKEN < size; TAKEN++) {
      vector<pair<int, int> > front(size, make_pair(1000000007, -1));
      vector<int> prev(size, -1);
      for (int i = 0; i < size; i++)
        if (!taken[0][i])
          for (int j = 0; j < size; j++)
            front[j] =
                min(front[j], make_pair(conn[I(i, j)] - v[0][i] - v[1][j], i));
      int dest = -1;
      while (dest == -1) {
        pair<int, int> mn = make_pair(1000000007, -1);
        for (int j = 0; j < size; j++)
          if (prev[j] == -1) mn = min(mn, make_pair(front[j].first, j));
        for (int j = 0; j < size; j++) front[j].first -= mn.first;
        for (int i = 0; i < size; i++)
          if (!taken[0][i]) v[0][i] += mn.first;
        for (int j = 0; j < size; j++)
          if (prev[j] != -1) {
            v[1][j] -= mn.first;
            v[0][rev[j]] += mn.first;
          }
        prev[mn.second] = front[mn.second].second;
        if (!taken[1][mn.second]) {
          dest = mn.second;
          taken[1][dest] = true;
        } else {
          int i = rev[mn.second];
          for (int j = 0; j < size; j++)
            front[j] =
                min(front[j], make_pair(conn[I(i, j)] - v[0][i] - v[1][j], i));
        }
      }
      rev[dest] = prev[dest];
      int up = dest;
      dest = prev[dest];
      while (revfrom[dest] != -1) {
        int ndest = revfrom[dest];
        revfrom[dest] = up;
        rev[ndest] = prev[ndest];
        up = ndest;
        dest = rev[ndest];
      }
      revfrom[dest] = up;
      taken[0][dest] = true;
    }
    int result = 0;
    for (int i = 0; i < size; i++) result += conn[I(i, revfrom[i])];
    return result;
  }
};
int bitcnt(int val) {
  if (val == 0) return 0;
  return bitcnt(val / 2) + val % 2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> a(n + m, -1), var(n + m);
  for (int i = 0; i < n; i++) cin >> a[i];
  Bipartite bp(n + m);
  for (int i = 0; i < m; i++)
    for (int j = 0; j < m; j++) bp.conn[bp.I(n + i, n + j)] = 0;
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      bp.conn[bp.I(n + i, j)] = bitcnt(a[j]);
      var[n + i] = i;
    }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) bp.conn[bp.I(i, n + j)] = 0;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      if (a[i] == a[j])
        bp.conn[bp.I(i, j)] = 0;
      else
        bp.conn[bp.I(i, j)] = bitcnt(a[j]);
    }
  int penalty = bp.match();
  vector<string> op;
  for (int i = 0; i < n; i++) {
    int p = bp.rev[i];
    var[i] = var[p];
    if (a[p] != a[i])
      op.push_back(string(1, 'a' + var[i]) + "=" + to_string(a[i]));
    op.push_back("print(" + string(1, 'a' + var[i]) + ")");
  }
  cout << op.size() << ' ' << penalty << '\n';
  for (auto c : op) cout << c << '\n';
  return 0;
}