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>
void Get(int &T) {
  char C;
  bool F = 0;
  for (; C = getchar(), C < '0' || C > '9';)
    if (C == '-') F = 1;
  for (T = C - '0'; C = getchar(), C >= '0' && C <= '9'; T = T * 10 + C - '0')
    ;
  F && (T = -T);
}
int N, M;
int A[255];
int W[255];
void Init() {
  Get(N);
  Get(M);
  for (int i = 1; i <= N; i++) {
    Get(A[i]);
    W[i] = __builtin_popcount(A[i]);
  }
}
struct E {
  int V, W, C, Next;
} Edge[125005];
int EdgeTop = 1;
int Head[505];
void Add(int U, int V, int W, int C) {
  Edge[++EdgeTop] = (E){V, W, C, Head[U]};
  Head[U] = EdgeTop;
}
int S, T;
int Q[5005];
int L, R;
int Dis[505];
bool InQueue[505];
int From[505];
bool SPFA() {
  memset(Dis, 0x2f, sizeof Dis);
  Dis[S] = 0;
  memset(InQueue, 0, sizeof InQueue);
  InQueue[S] = 1;
  Q[L = R = 1] = S;
  for (;;) {
    for (int i = Head[Q[L]]; i; i = Edge[i].Next) {
      if (Edge[i].W > 0 && Dis[Edge[i].V] > Dis[Q[L]] + Edge[i].C) {
        Dis[Edge[i].V] = Dis[Q[L]] + Edge[i].C;
        From[Edge[i].V] = i;
        if (InQueue[Edge[i].V] == 0) {
          InQueue[Edge[i].V] = 1;
          R++;
          if (R > 5000) R = 1;
          Q[R] = Edge[i].V;
        }
      }
    }
    InQueue[Q[L]] = 0;
    if (L == R) break;
    L++;
    if (L > 5000) L = 1;
  }
  return Dis[T] < 0x2f2f2f2f;
}
int Ans;
void Adj() {
  for (int i = T; i; i = Edge[From[i] ^ 1].V) {
    Edge[From[i]].W--;
    Edge[From[i] ^ 1].W++;
    Ans += Edge[From[i]].C;
  }
}
int Prev[255];
int Use[255];
int AnsL;
void Work() {
  S = N + N + 2;
  T = N + N + 3;
  Add(S, N + N + 1, M, 0);
  Add(N + N + 1, S, 0, 0);
  for (int i = 1; i <= N; i++) {
    Add(S, i, 1, 0);
    Add(i, S, 0, 0);
    Add(N + N + 1, N + i, 1, W[i]);
    Add(N + i, N + N + 1, 0, -W[i]);
    Add(N + i, T, 1, 0);
    Add(T, N + i, 0, 0);
    for (int j = i + 1; j <= N; j++) {
      Add(i, N + j, 1, (A[i] == A[j]) ? 0 : W[j]);
      Add(N + j, i, 0, (A[i] == A[j]) ? 0 : -W[j]);
    }
  }
  for (; SPFA();) {
    Adj();
  }
  for (int i = 2; i <= EdgeTop; i++)
    if (Edge[i ^ 1].V <= N && Edge[i].V >= N + 1 && Edge[i].V <= N + N &&
        Edge[i].W == 0) {
      Prev[Edge[i].V - N] = Edge[i ^ 1].V;
    }
  for (int i = 1, k = 'a'; i <= N; i++) {
    if (Prev[i] == 0) {
      AnsL += 2;
      Use[i] = k;
      k++;
    } else {
      if (A[Prev[i]] != A[i]) {
        AnsL++;
      }
      AnsL++;
      Use[i] = Use[Prev[i]];
    }
  }
}
void Output() {
  printf("%d %d\n", AnsL, Ans);
  for (int i = 1, k = 'a'; i <= N; i++) {
    if (Prev[i] == 0) {
      printf("%c=%d\n", k, A[i]);
      printf("print(%c)\n", k);
      Use[i] = k;
      k++;
    } else {
      if (A[Prev[i]] != A[i]) {
        printf("%c=%d\n", Use[Prev[i]], A[i]);
      }
      printf("print(%c)\n", Use[Prev[i]]);
      Use[i] = Use[Prev[i]];
    }
  }
}
int main() {
  Init();
  Work();
  Output();
  return 0;
}