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 = 300, inf = 1e9;
int n, K, A[maxn];
struct Tcost {
  static const int maxn = 1000, maxm = 500000;
  int S, T, tot;
  int dist, cost;
  struct Tsqy {
    int s, v;
    int c;
    Tsqy *l, *o;
    inline void set(Tsqy *_l, int _s, int _v, int _c) {
      l = _l, s = _s, v = _v, c = _c;
    }
  } * pos[maxn], buf[maxm * 2];
  inline void add(int a, int b, int c, int d) {
    buf[++tot].set(pos[a], b, c, d), buf[tot + 1].o = pos[a] = buf + tot;
    buf[++tot].set(pos[b], a, 0, -d), buf[tot - 1].o = pos[b] = buf + tot;
  }
  int d[maxn];
  Tsqy *f[maxn];
  int h[maxn];
  bool U[maxn];
  inline bool spfa() {
    int l = 0, r = 1, u, v;
    Tsqy *p;
    memset(d, 54, (T + 1) * sizeof d[0]), memset(U, 0, T + 1);
    h[1] = S, U[S] = 1, d[S] = 0;
    for (; l != r;) {
      u = h[l = l % 600 + 1];
      for (p = pos[u]; p; p = p->l)
        if (p->v && d[v = p->s] > d[u] + p->c) {
          d[v] = d[u] + p->c, f[v] = p;
          if (!U[v]) h[r = r % 600 + 1] = v, U[v] = 1;
        }
      U[u] = false;
    }
    return (dist = d[T]) < 700000000;
  }
  void aug() {
    int p, flow = inf;
    for (p = T; p != S; p = f[p]->o->s) flow = min(flow, f[p]->v);
    cost += dist * flow;
    for (p = T; p != S; p = f[p]->o->s) f[p]->v -= flow, f[p]->o->v += flow;
  }
  int mincost() {
    for (cost = 0; spfa(); aug())
      ;
    return cost;
  }
} flow;
namespace Ninit {
int bitlen(int x) {
  int Fc = 0;
  for (; x; x -= x & -x) ++Fc;
  return Fc;
}
void init() {
  int i, j;
  scanf("%d%d", &n, &K);
  for (i = 0; i < n; ++i) scanf("%d", A + i);
  flow.S = 2 * n + 1, flow.T = flow.S + 1;
  flow.add(flow.S, 2 * n, K, 0), flow.add(2 * n, flow.T, K, 0);
  for (i = 0; i < n; ++i)
    for (j = i + 1; j < n; ++j)
      flow.add(i + n, j, 1, A[i] != A[j] ? bitlen(A[j]) : 0);
  for (i = 0; i < n; ++i) {
    flow.add(i, i + n, 1, -8000);
    flow.add(2 * n, i, 1, bitlen(A[i]));
    flow.add(i + n, flow.T, 1, 0);
  }
}
}  // namespace Ninit
namespace Nsolve {
struct Tans {
  int n;
  struct Tsqy {
    int k, x, y;
  } a[1000];
  static inline bool cmp(const Tsqy &a, const Tsqy &b) {
    return a.y != b.y ? a.y < b.y : a.k < b.k;
  }
  inline void push(int k, int x, int y) {
    a[n].k = k, a[n].x = x, a[n].y = y, n++;
  }
  inline void sortit() { sort(a, a + n, cmp); }
} H;
int ans;
namespace Nconstrc {
int N;
void solve() {
  Tcost::Tsqy *p, *q, *t;
  int i, j;
  for (N = 0, p = flow.pos[2 * n]; p; p = p->l) {
    if (p->s < 0 || p->s >= n || p->v) continue;
    for (t = p, i = p->s; i != flow.T;) {
      if (t->c) H.push(0, N, i);
      H.push(1, N, i);
      for (q = flow.pos[i + n]; q; q = q->l)
        if (!q->v) {
          t = q, i = q->s;
          break;
        }
    }
    N++;
  }
}
}  // namespace Nconstrc
void solve() {
  int i;
  Tans::Tsqy *p;
  ans = flow.mincost() + 8000 * n;
  Nconstrc::solve();
  H.sortit(), printf("%d %d\n", H.n, ans);
  for (p = H.a; p < H.a + H.n; ++p) {
    p->k ? printf("print(%c)\n", (char)p->x + 'a')
         : printf("%c=%d\n", (char)p->x + 'a', A[p->y]);
  }
}
}  // namespace Nsolve
int main() {
  Ninit::init();
  Nsolve::solve();
  return 0;
}