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;
using uint = unsigned int;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &item) {
  out << '(' << item.first << ", " << item.second << ')';
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &v) {
  for (const auto &item : v) out << item << ' ';
  return out;
}
const int N = 540;
const int INF = 0x3f3f3f3f;
struct Edge {
  int to, flow, cst;
};
int source, sink;
int v[N];
int d[N], reald[N], newd[N], prv[N], vis[N];
vector<int> adj[N];
vector<Edge> edges;
void addEdge(int a, int b, int cap, int cst) {
  adj[a].push_back(edges.size());
  edges.push_back({b, cap, cst});
  adj[b].push_back(edges.size());
  edges.push_back({a, 0, -cst});
}
void bellman() {
  priority_queue<pii> q;
  memset(d, INF, sizeof d);
  for (d[source] = 0, q.push({0, source}); !q.empty();) {
    int dst = -q.top().first;
    int v = q.top().second;
    q.pop();
    if (dst != d[v]) continue;
    for (auto id : adj[v]) {
      int u = edges[id].to;
      if (edges[id].flow && d[u] > d[v] + edges[id].cst) {
        d[u] = d[v] + edges[id].cst;
        q.push({-d[u], u});
      }
    }
  }
}
bool dijkstra() {
  priority_queue<pii> q;
  memset(newd, INF, sizeof newd);
  memset(vis, 0, sizeof vis);
  for (reald[source] = newd[source] = 0, q.push({0, source}); !q.empty();) {
    int dst = -q.top().first;
    int v = q.top().second;
    q.pop();
    if (vis[v]) continue;
    vis[v] = true;
    for (auto id : adj[v]) {
      int u = edges[id].to;
      int w = d[v] + edges[id].cst - d[u];
      if (edges[id].flow && newd[u] > newd[v] + w) {
        newd[u] = newd[v] + w;
        reald[u] = reald[v] + edges[id].cst;
        prv[u] = id;
        q.push({-newd[u], u});
      }
    }
  }
  return newd[sink] < INF;
}
int getFlow() {
  int cst;
  bellman();
  for (cst = 0; dijkstra();) {
    int pushed = INF;
    for (int v = sink; v != source; v = edges[prv[v] ^ 1].to) {
      pushed = min(pushed, edges[prv[v]].flow);
    }
    for (int v = sink; v != source; v = edges[prv[v] ^ 1].to) {
      cst += pushed * edges[prv[v]].cst;
      edges[prv[v]].flow -= pushed;
      edges[prv[v] ^ 1].flow += pushed;
    }
    memcpy(d, reald, sizeof reald);
  }
  return cst;
}
int getCost(int x) {
  int ans = 0;
  while (x) ++ans, x &= x - 1;
  return ans;
}
int var[N], value[N];
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> v[i];
  source = 0;
  sink = m + n + n + 1;
  for (int i = 1; i <= m + n; ++i) addEdge(source, i, 1, 0);
  for (int i = m + n + 1; i <= m + n + n; ++i) addEdge(i, sink, 1, 0);
  for (int i = 1; i <= m; ++i)
    for (int j = m + n + 1; j <= m + n + n; ++j)
      addEdge(i, j, 1, getCost(v[j - m - n]));
  for (int i = m + 1; i <= m + n; ++i)
    for (int j = n + i + 1; j <= m + n + n; ++j)
      addEdge(i, j, 1, v[i - m] == v[j - m - n] ? 0 : getCost(v[j - m - n]));
  int nrop = n, cst = getFlow();
  for (int i = m + n + 1; i <= m + n + n; ++i)
    for (auto id : adj[i]) {
      if (id % 2 && edges[id].flow) {
        int j = edges[id].to;
        assert(1 <= j && j <= m + n);
        if (j <= m)
          var[i - m - n] = j, ++nrop;
        else
          var[i - m - n] = var[j - m], nrop += (v[i - m - n] != v[j - m]);
      }
    }
  cout << nrop << ' ' << cst << '\n';
  for (int i = 1; i <= n; ++i) {
    if (value[var[i]] != v[i]) {
      cout << char('a' + var[i] - 1) << '=' << v[i] << '\n';
      value[var[i]] = v[i];
    }
    cout << "print(" << char('a' + var[i] - 1) << ")\n";
  }
  return 0;
}