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 MAXN = 250;
const int INF = 0x3f3f3f3f;
const long long int LLF = 0x3f3f3f3f3f3fll;
template <class T>
void Read(T &x) {
  x = 0;
  char c = getchar();
  bool flag = 0;
  while (c < '0' || '9' < c) {
    if (c == '-') flag = 1;
    c = getchar();
  }
  while ('0' <= c && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  if (flag) x = -x;
}
namespace ISAP {
const int MAXP = MAXN * 2;
const int MAXE = MAXN * MAXN * 2;
struct node {
  int v, c;
  long long int w;
  node *nxt, *bck;
} * adj[MAXP + 10], Edges[MAXE * 2 + 10], *New = Edges;
inline void addedges(int u, int v, int c, long long int w) {
  node *p = ++New;
  p->v = v;
  p->c = c;
  p->w = w;
  p->bck = New + 1;
  p->nxt = adj[u];
  adj[u] = p;
  p = ++New;
  p->v = u;
  p->c = 0;
  p->w = -w;
  p->bck = New - 1;
  p->nxt = adj[v];
  adj[v] = p;
}
int S, T, P;
queue<int> que;
long long int dist[MAXP + 10];
int flow[MAXP + 10];
bool vis[MAXP + 10];
node *pre[MAXP + 10];
inline void init(int s, int t, int p) {
  S = s, T = t, P = p;
  memset(adj, 0, sizeof(adj));
  New = Edges;
}
inline int SPFA() {
  memset(dist, 0x3f, sizeof(dist));
  memset(flow, 0, sizeof(flow));
  memset(pre, 0, sizeof(pre));
  memset(vis, 0, sizeof(vis));
  while (!que.empty()) que.pop();
  dist[S] = 0, flow[S] = INF;
  vis[S] = true, que.push(S);
  int now;
  while (!que.empty()) {
    now = que.front(), que.pop();
    vis[now] = false;
    for (node *p = adj[now]; p != NULL; p = p->nxt) {
      if (p->c && dist[p->v] > dist[now] + p->w) {
        dist[p->v] = dist[now] + p->w;
        flow[p->v] = min(flow[now], p->c);
        pre[p->v] = p->bck;
        if (!vis[p->v]) vis[p->v] = true, que.push(p->v);
      }
    }
  }
  return flow[T];
}
inline void delflow(int v) {
  int x = T;
  while (pre[x]) {
    pre[x]->bck->c -= v;
    pre[x]->c += v;
    x = pre[x]->v;
  }
}
long long int MCMF() {
  long long int ret = 0;
  while (SPFA()) {
    ret += dist[T] * flow[T];
    delflow(flow[T]);
  }
  return ret;
}
}  // namespace ISAP
int n, m;
int A[MAXN + 10];
int kd[MAXN * 3 + 10], val[MAXN * 3 + 10];
char s[MAXN * 3 + 10];
set<char> var[MAXN + 10];
inline int getsquence() {
  int ret = 0, t;
  char v;
  int cnt = 'a' - 1;
  for (int i = 1; i <= n; ++i) {
    for (ISAP::node *p = ISAP::adj[i]; p != NULL; p = p->nxt)
      if (p->bck == p - 1) {
        if (t = p->c) {
          if (p->v == n * 2 + 1) {
            var[i].insert(++cnt);
            ++ret;
            kd[ret] = 1;
            s[ret] = cnt, val[ret] = A[i];
            ++ret;
            kd[ret] = 2;
            s[ret] = cnt, val[ret] = i;
          } else {
            while (t) {
              v = *var[p->v - n].begin();
              var[i].insert(v), var[p->v - n].erase(v);
              --t;
              if (A[i] != A[p->v - n]) {
                ++ret;
                kd[ret] = 1;
                s[ret] = v, val[ret] = A[i];
              }
              ++ret;
              kd[ret] = 2;
              s[ret] = v, val[ret] = i;
            }
          }
        }
      }
  }
  return ret;
}
int main() {
  Read(n), Read(m);
  for (int i = 1; i <= n; ++i) Read(A[i]);
  ISAP::init(n * 2 + 2, n * 2 + 3, n * 2 + 3);
  ISAP::addedges(ISAP::S, n * 2 + 1, m, 0);
  ISAP::addedges(n * 2 + 1, ISAP::T, m, 0);
  for (int i = 1; i <= n; ++i) {
    ISAP::addedges(n * 2 + 1, i, 1, __builtin_popcount(A[i]));
    ISAP::addedges(i, n + i, 1, -LLF);
    ISAP::addedges(n + i, ISAP::T, 1, 0);
    for (int j = i + 1; j <= n; ++j)
      ISAP::addedges(n + i, j, 1, A[i] == A[j] ? 0 : __builtin_popcount(A[j]));
  }
  long long int ans2 = ISAP::MCMF() + 1ll * n * LLF;
  int ans1 = getsquence();
  printf("%d %I64d\n", ans1, ans2);
  for (int i = 1; i <= ans1; ++i) {
    if (kd[i] == 1)
      printf("%c=%d\n", s[i], val[i]);
    else
      printf("print(%c)\n", s[i]);
  }
}