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 = (int)1e9;
struct edge {
  int u, v;
  int flow;
  int cost;
  edge() {}
  edge(int u, int v, int f, int c) : u(u), v(v), flow(f), cost(c) {}
};
struct MinCostMaxFlow {
  int N;
  vector<vector<int> > G;
  vector<edge> E;
  int numEdges;
  vector<int> found, dad;
  vector<int> dist;
  MinCostMaxFlow(int N) : N(N), G(N), found(N), dist(N), dad(N), numEdges(0) {}
  void addEdge(int from, int to, int capacity, int cost) {
    G[from].push_back(numEdges++);
    E.push_back(edge(from, to, capacity, cost));
    G[to].push_back(numEdges++);
    E.push_back(edge(to, from, 0, int(-1) * cost));
  }
  bool spfa(int s, int t) {
    fill(dad.begin(), dad.end(), -1);
    fill(dist.begin(), dist.end(), INF);
    fill(found.begin(), found.end(), 0);
    queue<int> Q;
    dist[s] = 0;
    Q.push(s);
    found[s] = true;
    while (!Q.empty()) {
      int u = Q.front();
      Q.pop();
      if (u == t) continue;
      for (int i = 0; i < G[u].size(); ++i) {
        edge &pres = E[G[u][i]];
        int v = pres.v;
        if (pres.flow <= 0) continue;
        if (dist[u] + pres.cost < dist[v]) {
          dad[v] = G[u][i];
          dist[v] = dist[u] + pres.cost;
          if (!found[v]) Q.push(v), found[v] = true;
        }
      }
      found[u] = false;
    }
    return (dad[t] != -1);
  }
  int dfs(int s, int t) {
    int flow = INF;
    for (int i = dad[t]; i != -1; i = dad[E[i].u]) {
      if (E[i].flow < flow) flow = E[i].flow;
    }
    for (int i = dad[t]; i != -1; i = dad[E[i].u]) {
      E[i].flow -= flow;
      E[i ^ 1].flow += flow;
    }
    return flow;
  }
  pair<int, int> getMaxFlow(int s, int t) {
    int totflow = 0;
    int totcost = 0;
    while (spfa(s, t)) {
      int amt = dfs(s, t);
      totflow += amt;
      totcost += dist[t] * (int)amt;
    }
    return make_pair(totflow, totcost);
  }
};
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  MinCostMaxFlow mcmf(n * 2 + m + 2);
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      mcmf.addEdge(i + 1, j + n + 1 + m, 1,
                   (a[i] == a[j] ? 0 : __builtin_popcount(a[j])));
    }
  }
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < n; ++j) {
      mcmf.addEdge(i + n + 1, j + n + m + 1, 1, __builtin_popcount(a[j]));
    }
    mcmf.addEdge(0, i + n + 1, 1, 0);
  }
  for (int i = 0; i < n; ++i) {
    mcmf.addEdge(0, i + 1, 1, 0);
    mcmf.addEdge(i + n + m + 1, n + m + n + 1, 1, 0);
  }
  pair<int, int> ret = mcmf.getMaxFlow(0, n + n + m + 1);
  vector<int> who(n);
  for (int i = 1; i <= n + m; ++i) {
    for (int c : mcmf.G[i]) {
      edge e = mcmf.E[c];
      if (e.flow == 0 && e.v != 0) {
        who[e.v - n - m - 1] = i - 1;
        assert(e.u == i);
      }
    }
  }
  vector<int> last(n, -1);
  vector<string> fans;
  for (int i = 0; i < n; ++i) {
    int f = who[i];
    if (f >= n) {
      stringstream ss;
      ss << (char)(f - n + 'a') << "=" << a[i] << " ";
      ss << "print(" << (char)(f - n + 'a') << ")";
      string tmp;
      ss >> tmp;
      fans.push_back(tmp);
      ss >> tmp;
      fans.push_back(tmp);
      last[i] = f - n;
    } else {
      if (a[who[i]] == a[i]) {
        stringstream ss;
        ss << "print(" << (char)(last[who[i]] + 'a') << ")";
        string tmp;
        ss >> tmp;
        fans.push_back(tmp);
      } else {
        stringstream ss;
        ss << (char)(last[who[i]] + 'a') << "=" << a[i] << " ";
        ss << "print(" << (char)(last[who[i]] + 'a') << ")";
        string tmp;
        ss >> tmp;
        fans.push_back(tmp);
        ss >> tmp;
        fans.push_back(tmp);
      }
      last[i] = last[who[i]];
    }
  }
  cout << fans.size() << " " << ret.second << "\n";
  for (string t : fans) cout << t << "\n";
  return 0;
}