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;
int m, n, j, k, l, i, o, p, __t, A[1000000];
char ch;
void read(int &a) {
  for (ch = getchar(); (ch < '0' || ch > '9') && (ch != '-'); ch = getchar())
    ;
  if (ch == '-')
    a = 0, __t = -1;
  else
    a = ch - '0', __t = 1;
  for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
    a = a * 10 + ch - '0';
  a *= __t;
}
struct graph {
  int Be[1000000], E[1000000], N[1000000], F[1000000], P[1000000], T, _S, _T;
  graph() { T = 1; }
  void make(int i, int j, int k, int l, int o) {
    N[++T] = Be[i];
    Be[i] = T;
    E[T] = j;
    F[T] = k;
    P[T] = l;
    if (o) make(j, i, 0, -l, 0);
  }
  int L[1000000], op, ed, inque[1000000], depth[1000000], _d, Dis[1000000],
      From[1000000], ans;
  bool SPFA() {
    inque[L[op = ed = 1] = _S] = 1;
    Dis[_S] = 0;
    depth[_S] = ++_d;
    for (int now = L[ed]; ed <= op; ed++, inque[now] = 0, now = L[ed])
      for (int i = Be[now]; i; i = N[i])
        if (F[i] > 0 &&
            Dis[now] + P[i] < ((depth[E[i]] == _d) ? (Dis[E[i]]) : (100000))) {
          depth[E[i]] = _d;
          Dis[E[i]] = Dis[now] + P[i];
          From[E[i]] = i;
          if (!inque[E[i]]) inque[L[++op] = E[i]] = 1;
        }
    if (depth[_T] != _d || Dis[_T] >= 0) return 0;
    return 1;
  }
  void Solve() {
    for (; SPFA() && (n--);) {
      for (int p = _T; p != _S; p = E[From[p] ^ 1])
        ans += P[From[p]], F[From[p]]--, F[From[p] ^ 1]++;
    }
  }
  int print[1000000], now[1000000], tag, tot;
  void Build_ans() {
    for (int i = (1); i <= (m); i++)
      if (!inque[i]) {
        inque[L[op = ed = 1] = i] = 1;
        for (int now = L[ed] * 2; ed <= op; ed++, now = L[ed] * 2)
          for (int j = Be[now]; j; j = N[j])
            if (F[j] == 0 && E[j] > now && E[j] <= 2 * m && E[j] % 2 == 1)
              inque[L[++op] = (E[j] / 2 + 1)] = 1;
        for (int j = (1); j <= (op); j++)
          print[L[j]] = tag, tot += 1 + (A[L[j - 1]] != A[L[j]]);
        tag++;
      }
    printf("%d %d\n", tot, ans + m * 100000);
    for (int i = (1); i <= (m); i++) {
      int t = print[i];
      if (now[t] != A[i]) printf("%c=%d\n", 'a' + t, A[i]), now[t] = A[i];
      printf("print(%c)\n", 'a' + t);
    }
  }
} pic;
int Calc(int P) {
  int ret = 0;
  for (long long i = 1; i <= P; i *= 2LL)
    if (P & i) ret++;
  return ret;
}
int main() {
  read(m), read(n);
  for (int i = (1); i <= (m); i++) read(A[i]);
  pic._S = 2 * m + 1;
  pic._T = 2 * m + 2;
  for (int i = (1); i <= (m); i++) {
    pic.make((i * 2 - 1), (i * 2), 1, -100000, 1);
    pic.make(pic._S, (i * 2 - 1), 1, Calc(A[i]), 1);
    pic.make((i * 2), pic._T, 1, 0, 1);
    for (int j = (i + 1); j <= (m); j++)
      pic.make((i * 2), (j * 2 - 1), 1, ((A[i] == A[j]) ? (0) : (Calc(A[j]))),
               1);
  }
  pic.Solve();
  pic.Build_ans();
}