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 inf = 1e6;
template <class S, class T>
inline pair<S, T> MP(S a, T b) {
  return make_pair(a, b);
}
template <class T>
inline auto LX(T &X) -> decltype((X.first)) {
  return X.first;
}
template <class T>
inline auto LX(const T &X) -> const decltype((X.first)) {
  return X.first;
}
template <class T>
inline auto RX(T &X) -> decltype((X.second)) {
  return X.second;
}
template <class T>
inline auto RX(const T &X) -> const decltype((X.second)) {
  return X.second;
}
template <class T>
inline void RST(T &a) {
  memset(a, 0, sizeof(a));
}
template <class T>
inline void RST1(T &a) {
  memset(a, -1, sizeof(a));
}
template <class T>
inline void SINF(T &a) {
  memset(a, 0x0f, sizeof(a));
}
template <class S, class T>
inline void RST(S &a, T b) {
  fill((T *)a, (T *)a + (sizeof(a) / sizeof(b)), b);
}
template <class T>
inline void CLR(T &a) {
  a.clear();
}
template <class S, class T>
inline void CPY(S &a, T &b) {
  memcpy(a, b, sizeof(a));
}
template <class S, class T>
inline bool chkmin(S &a, T b) {
  return b < a ? a = b, 1 : 0;
}
template <class S, class T>
inline bool chkmax(S &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline int SZ(T &a) {
  return (int)(a.size());
}
template <class T>
inline bool EPT(T &a) {
  return a.empty();
}
template <class T>
inline auto FRT(T &a) -> decltype((a.front())) {
  return a.front();
}
template <class T>
inline auto FRT(const T &a) -> const decltype((a.front())) {
  return a.front();
}
template <class T>
inline auto BK(T &a) -> decltype(a.back()) & {
  return a.back();
}
template <class T>
inline auto BK(const T &a) -> const decltype((a.back())) {
  return a.back();
}
template <class T>
inline auto TOP(T &a) -> decltype((a.top())) {
  return a.top();
}
template <class T>
inline auto TOP(const T &a) -> const decltype((a.top())) {
  return a.top();
}
int n, m, N;
int a[300];
int g[300][300];
int lx[300], ly[300], slack[300], link[300];
bool vx[300], vy[300];
bool aug(int x) {
  vx[x] = 1;
  int t;
  for (int y = 1; y <= N; y++)
    if (t = lx[x] + ly[y] - g[x][y])
      chkmin(slack[y], t);
    else if (!vy[y]) {
      vy[y] = 1;
      if (!link[y] || aug(link[y])) return link[y] = x;
    }
  return 0;
}
int res[300], tot;
bool w[300];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  RST(g, -inf);
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= n; j++) g[n + i][j] = -__builtin_popcount(a[j]);
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++)
      g[i][j] = a[i] == a[j] ? 0 : -__builtin_popcount(a[j]);
  N = n + m;
  RST(lx, -inf);
  for (int i = 1; i <= N; i++)
    for (int j = 1; j <= N; j++) chkmax(lx[i], g[i][j]);
  for (int i = 1; i <= N; i++)
    for (;;) {
      RST(vx);
      RST(vy);
      RST(slack, inf);
      if (aug(i)) break;
      int t = inf;
      for (int i = 1; i <= N; i++)
        if (!vy[i]) chkmin(t, slack[i]);
      for (int i = 1; i <= N; i++)
        if (vx[i]) lx[i] -= t;
      for (int i = 1; i <= N; i++)
        if (vy[i]) ly[i] += t;
    }
  for (int i = 1; i <= n; i++)
    if (link[i] > n)
      tot++, res[i] = link[i] - n, w[i] = 1;
    else if (a[link[i]] != a[i])
      tot++, res[i] = res[link[i]], w[i] = 1;
    else
      res[i] = res[link[i]];
  int ans = inf * m;
  for (int i = 1; i <= N; i++) ans += lx[i] + ly[i];
  printf("%d %d\n", tot + n, -ans);
  for (int i = 1; i <= n; i++) {
    if (w[i]) printf("%c=%d\n", res[i] + 'a' - 1, a[i]);
    printf("print(%c)\n", res[i] + 'a' - 1);
  }
  return 0;
}