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 long long big = 1 << 29;
const long long INF = 1LL << 40;
using namespace std;
struct Edge {
  int to, next, cap, flow;
  long long cost;
} edge[100000 + 10];
int head[100000 + 10], tol;
int pre[100000 + 10];
long long dis[100000 + 10];
bool vis[100000 + 10];
int E;
void init(int t) {
  E = t;
  tol = 0;
  memset(head, -1, sizeof head);
}
void add_edge(int u, int v, int cap, int cost) {
  edge[tol].to = v;
  edge[tol].cap = cap;
  edge[tol].cost = cost;
  edge[tol].flow = 0;
  edge[tol].next = head[u];
  head[u] = tol++;
  edge[tol].to = u;
  edge[tol].cap = 0;
  edge[tol].cost = -cost;
  edge[tol].flow = 0;
  edge[tol].next = head[v];
  head[v] = tol++;
}
bool spfa(int s, int t) {
  queue<int> q;
  for (int i = 0; i < E; i++) {
    dis[i] = INF;
    vis[i] = false;
    pre[i] = -1;
  }
  dis[s] = 0;
  vis[s] = true;
  q.push(s);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    vis[u] = false;
    for (int i = head[u]; i != -1; i = edge[i].next) {
      int v = edge[i].to;
      if (edge[i].cap > edge[i].flow && dis[v] > dis[u] + edge[i].cost) {
        dis[v] = dis[u] + edge[i].cost;
        pre[v] = i;
        if (!vis[v]) {
          vis[v] = true;
          q.push(v);
        }
      }
    }
  }
  if (pre[t] == -1)
    return false;
  else
    return true;
}
int minCostMaxflow(int s, int t, long long &cost, int &flow) {
  while (spfa(s, t)) {
    long long Min = INF;
    for (int i = pre[t]; i != -1; i = pre[edge[i ^ 1].to]) {
      if (Min > edge[i].cap - edge[i].flow) Min = edge[i].cap - edge[i].flow;
    }
    for (int i = pre[t]; i != -1; i = pre[edge[i ^ 1].to]) {
      edge[i].flow += Min;
      edge[i ^ 1].flow -= Min;
      cost += edge[i].cost * Min;
    }
    flow += Min;
  }
  return flow;
}
int cnt_bit(int x) { return __builtin_popcount(x); }
int ara[100000 + 10];
int par[100000 + 10];
int Flw[100000 + 10];
vector<pair<int, int> > vc[100000 + 10], mc[100000 + 10];
int main() {
  int i, j, k, l, m, n;
  scanf("%d%d", &n, &m);
  init(n + n + m + 4);
  int source = 0;
  int sink = n + n + m + 1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ara[i]);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      vc[j].push_back(make_pair(tol, i));
      if (ara[i] == ara[j])
        add_edge(i + n, j, 1, 0);
      else
        add_edge(i + n, j, 1, cnt_bit(ara[j]));
    }
    add_edge(i + n, sink, 1, 0);
    add_edge(i, i + n, 1, -big);
    for (int j = 1; j <= m; j++) {
      mc[i].push_back(make_pair(tol, j));
      add_edge(j + n + n, i, 1, cnt_bit(ara[i]));
    }
  }
  int prv = 1 << 30;
  long long cost = 0;
  int flow = 0;
  for (int i = 1; i <= m; i++) {
    add_edge(source, i + n + n, 1, 0);
    int c = minCostMaxflow(source, sink, cost, flow);
    if (c != i) break;
    if (cost + (big * n) > prv) break;
    prv = cost + (big * n);
    for (int i = 0; i < tol; i++) {
      Flw[i] = edge[i].flow;
    }
  }
  int op = 0;
  for (int i = 1; i <= n; i++) {
    int ck = 0;
    for (int j = 0; j < mc[i].size(); j++) {
      int c = mc[i][j].first;
      if (Flw[c] == 0) continue;
      int g = mc[i][j].second;
      par[i] = g;
      ck = 1;
      op += 2;
      break;
    }
    if (ck) continue;
    for (int j = 0; j < vc[i].size(); j++) {
      int c = vc[i][j].first;
      if (Flw[c] == 0) continue;
      int g = vc[i][j].second;
      par[i] = par[g];
      if (ara[g] == ara[i]) {
        op++;
        break;
      }
      op += 2;
      break;
    }
  }
  printf("%d %d\n", op, prv);
  for (int i = 1; i <= n; i++) {
    int ck = 0;
    for (int j = 0; j < mc[i].size(); j++) {
      int c = mc[i][j].first;
      if (Flw[c] == 0) continue;
      int g = mc[i][j].second;
      par[i] = g;
      ck = 1;
      printf("%c=%d\n", g + 96, ara[i]);
      printf("print(%c)\n", g + 96);
      break;
    }
    if (ck) continue;
    for (int j = 0; j < vc[i].size(); j++) {
      int c = vc[i][j].first;
      if (Flw[c] == 0) continue;
      int g = vc[i][j].second;
      par[i] = par[g];
      if (ara[g] == ara[i]) {
        printf("print(%c)\n", par[i] + 96);
        break;
      }
      printf("%c=%d\n", par[i] + 96, ara[i]);
      printf("print(%c)\n", par[i] + 96);
      break;
    }
  }
}