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)
#include <bits/stdc++.h>
using namespace std;
const int MAXV = 600, MAXE = 70000, inf = 1000000000;
int N, Count;
int G[MAXV], Queue[MAXV], Dist[MAXV], Pre[MAXV], Last[MAXV];
int Data[MAXE], Weight[MAXE], Cost[MAXE], Next[MAXE];
bool Flag[MAXV];
int Calc(int X) {
  if (!X) return 0;
  return Calc(X / 2) + X % 2;
}
void Add(int Number, int V1, int V2, int W, int C) {
  Data[Number] = V2;
  Weight[Number] = W;
  Cost[Number] = C;
  Next[Number] = G[V1];
  G[V1] = Number;
}
void Connect(int V1, int V2, int W, int C) {
  Add(Count++, V1, V2, W, C);
  Add(Count++, V2, V1, 0, -C);
}
int SPFA(int S, int T) {
  for (int i = 0; i <= T; i++) Dist[i] = inf;
  Dist[S] = 0;
  memset(Flag, 0, sizeof(Flag));
  Queue[0] = S;
  int F = 0, R = 1;
  while (F != R) {
    int V = Queue[F++];
    if (F == MAXV) F = 0;
    int P = G[V];
    Flag[V] = false;
    while (P != -1) {
      int U = Data[P];
      if (Weight[P] && Dist[V] + Cost[P] < Dist[U]) {
        Dist[U] = Dist[V] + Cost[P];
        Pre[U] = P;
        if (!Flag[U]) Flag[Queue[R++] = U] = true;
        if (R == MAXV) R = 0;
      }
      P = Next[P];
    }
  }
  if (Dist[T] == inf) return -1;
  int V = T;
  while (V != S) {
    Weight[Pre[V]]--;
    Weight[Pre[V] ^ 1]++;
    int U = Data[Pre[V] ^ 1];
    if (U <= N && V > N) Last[V - N - 1] = U;
    V = U;
  }
  return Dist[T];
}
int main() {
  int M;
  cin >> N >> M;
  int A[250];
  for (int i = 0; i < N; i++) cin >> A[i];
  int S = N * 2 + 1, T = N * 2 + 2;
  Count = 0;
  for (int i = 0; i <= T; i++) G[i] = -1;
  for (int i = 0; i < N; i++) Connect(S, i, 1, 0);
  Connect(S, N, M, 0);
  for (int i = 0; i < N; i++)
    for (int j = i + 1; j < N; j++)
      if (A[i] == A[j])
        Connect(i, N + j + 1, 1, 0);
      else
        Connect(i, N + j + 1, 1, Calc(A[j]));
  for (int i = 0; i < N; i++) Connect(N, N + i + 1, 1, Calc(A[i]));
  for (int i = 1; i <= N; i++) Connect(N + i, T, 1, 0);
  int Ans = 0, Tmp;
  while (Tmp = SPFA(S, T), Tmp != -1) Ans += Tmp;
  int Total = N;
  for (int i = 0; i < N; i++)
    if (Last[i] == N || A[Last[i]] != A[i]) Total++;
  cout << Total << ' ' << Ans << endl;
  int Number = 0, Var[250];
  for (int i = 0; i < N; i++)
    if (Last[i] == N) {
      Var[i] = Number++;
      printf("%c=%d\nprint(%c)\n", Var[i] + 97, A[i], Var[i] + 97);
    } else if (A[i] == A[Last[i]]) {
      Var[i] = Var[Last[i]];
      printf("print(%c)\n", Var[i] + 97);
    } else {
      Var[i] = Var[Last[i]];
      printf("%c=%d\nprint(%c)\n", Var[i] + 97, A[i], Var[i] + 97);
    }
  return 0;
}
