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 Edge {
  int st, en, next;
  long long flow, cost, cap;
} edge[1000000];
int head[50005], tot, now[50005];
int source, sink;
long long pre[50005], dis[50005];
queue<int> q;
bool vs[50005];
void add_edge(int st, int en, long long cap, long long cost) {
  edge[tot].st = st;
  edge[tot].en = en;
  edge[tot].cap = cap;
  edge[tot].flow = 0;
  edge[tot].cost = cost;
  edge[tot].next = head[st];
  head[st] = tot++;
  edge[tot].st = en;
  edge[tot].en = st;
  edge[tot].cap = 0;
  edge[tot].flow = 0;
  edge[tot].cost = -cost;
  edge[tot].next = head[en];
  head[en] = tot++;
}
bool SPFA() {
  for (int i = 0; i < 50005; i++) dis[i] = 0x3fffffffffffll;
  memset(vs, 0, sizeof(vs));
  memset(now, -1, sizeof(now));
  while (!q.empty()) q.pop();
  q.push(source);
  dis[source] = 0;
  vs[source] = 1;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    vs[u] = 0;
    for (int i = head[u], v; i != -1; i = edge[i].next)
      if (edge[i].cap - edge[i].flow > 0 &&
          dis[v = edge[i].en] > dis[u] + edge[i].cost) {
        dis[v] = dis[u] + edge[i].cost;
        now[v] = i;
        if (!vs[v]) {
          vs[v] = 1;
          q.push(v);
        }
      }
  }
  if (dis[sink] != 0x3fffffffffffll)
    return true;
  else
    return false;
}
long long MCMF() {
  long long cost = 0;
  while (SPFA()) {
    long long flow = 0x3fffffffffffll;
    for (int u = sink; u != source; u = edge[now[u]].st)
      if (flow > edge[now[u]].cap - edge[now[u]].flow)
        flow = edge[now[u]].cap - edge[now[u]].flow;
    for (int u = sink; u != source; u = edge[now[u]].st) {
      edge[now[u]].flow += flow;
      edge[now[u] ^ 1].flow -= flow;
    }
    cost += flow * dis[sink];
  }
  return cost;
}
long long COST(long long x) {
  long long ret = 0;
  while (x) {
    if (x & 1ll) ret++;
    x >>= 1ll;
  }
  return ret;
}
int who[50005];
bool vis[50005];
int u = -1;
long long n, m;
int P[50005];
void dfs(int now) {
  vis[now] = true;
  for (int i = head[now]; i != -1; i = edge[i].next) {
    int v = edge[i].en;
    if (!vis[v] && edge[i].flow != 0ll) {
      if (edge[i].cost != 0ll) {
        int st, ed;
        st = now, ed = v;
        if (ed > n) ed -= n;
        if (st > n) st -= n;
        if (st > ed) swap(st, ed);
        P[ed] = st;
      }
      dfs(v);
    }
  }
}
map<int, char> num;
int sum = 0;
int o[10000][3];
int main() {
  while (cin >> n >> m) {
    memset(vis, false, sizeof(vis));
    memset(head, -1, sizeof(head));
    tot = 0;
    source = 2 * n + 1, sink = 2 * n + 2;
    int t;
    for (int i = 1; i <= n; i++) scanf("%d", &who[i]);
    for (int i = 1; i <= n; i++) {
      add_edge(i, i + n, 1, 0);
      add_edge(0, i, 1, -0x3fffffffffffll + COST(who[i]));
      add_edge(i + n, sink, 0x3fffffffffffll, 0);
    }
    who[0] = 0;
    for (int i = 1; i <= n; i++) {
      for (int j = i + 1; j <= n; j++) {
        if (who[i] == who[j])
          add_edge(i + n, j, 1, -0x3fffffffffffll);
        else
          add_edge(i + n, j, 1, -0x3fffffffffffll + COST(who[j]));
      }
    }
    add_edge(source, 0, m, 0);
    add_edge(0, sink, m, 0);
    long long ans = MCMF();
    dfs(source);
    num.clear();
    for (int i = 1; i <= n; i++) {
      if (P[i]) {
        if (who[P[i]] == who[i]) {
        } else {
          sum++;
          o[sum][0] = 0;
          o[sum][1] = num[who[P[i]]];
          o[sum][2] = who[i];
          num[who[i]] = num[who[P[i]]];
        }
      } else {
        u++;
        char ch = char('a' + u);
        sum++;
        o[sum][0] = 0;
        o[sum][1] = ch;
        o[sum][2] = who[i];
        num[who[i]] = ch;
      }
      sum++;
      o[sum][0] = 1;
      o[sum][1] = num[who[i]];
    }
    cout << sum << " " << (ans + n * 0x3fffffffffffll) << endl;
    for (int i = 1; i <= sum; i++)
      if (o[i][0])
        printf("print(%c)\n", o[i][1]);
      else
        printf("%c=%d\n", o[i][1], o[i][2]);
  }
}