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;
template <typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U>& _p) {
  return os << "(" << _p.first << "," << _p.second << ")";
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& _V) {
  bool f = true;
  os << "[";
  for (auto v : _V) {
    os << (f ? "" : ",") << v;
    f = false;
  }
  return os << "]";
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& _S) {
  bool f = true;
  os << "(";
  for (auto s : _S) {
    os << (f ? "" : ",") << s;
    f = false;
  }
  return os << ")";
}
template <typename T, typename U>
ostream& operator<<(ostream& os, const map<T, U>& _M) {
  return os << set<pair<T, U>>(_M.begin(), _M.end());
}
const signed long long INF = 1000000100LL;
const long double EPS = 1e-9;
namespace MCMF {
const int MAXN = 200010;
const int MAXE = 400500;
int s, t, pre[MAXN], mcnt;
int maxflow, ans;
struct arc {
  int x, f, c, next;
} e[MAXE];
void add_edge(int x, int y, int z, int c) {
  e[mcnt] = (arc){y, z, c, pre[x]}, pre[x] = mcnt++;
  e[mcnt] = (arc){x, 0, -c, pre[y]}, pre[y] = mcnt++;
}
map<pair<int, int>, int> flows() {
  map<pair<int, int>, int> R;
  for (int(i) = (0); (i) < (mcnt); (i)++)
    if (i % 2 == 0) {
      if (e[i + 1].f > 0) R[make_pair(e[i + 1].x, e[i].x)] = e[i + 1].f;
    }
  return R;
}
void init(int n, int _s, int _t) {
  for (int(i) = (0); (i) <= (_t); (i)++) pre[i] = -1;
  s = _s;
  t = _t;
}
int d[MAXN];
bool f[MAXN];
queue<int> q;
void Bellman_Ford() {
  int i, x, y, z;
  for (int(_) = (1); (_) <= (t); (_)++) f[i] = 0;
  for (i = 0; i <= t; ++i) d[i] = 1 << 30;
  d[s] = 0, f[s] = 1, q.push(s);
  while (!q.empty()) {
    x = q.front(), q.pop(), f[x] = 0;
    for (i = pre[x]; ~i; i = e[i].next) {
      y = e[i].x, z = e[i].c;
      if (e[i].f && d[y] > d[x] + z) {
        d[y] = d[x] + z;
        if (!f[y]) q.push(y), f[y] = 1;
      }
    }
  }
  for (i = 0; i <= t; ++i) d[i] = d[t] - d[i];
}
int zkwpush(int x, int flow = 1 << 30) {
  if (x == t || !flow) {
    maxflow += flow, ans += d[s] * flow;
    return flow;
  }
  f[x] = 1;
  int now = flow;
  for (int i = pre[x]; ~i; i = e[i].next) {
    int y = e[i].x, u;
    if (e[i].f && !f[y] && d[y] + e[i].c == d[x] &&
        (u = zkwpush(y, min(now, e[i].f)))) {
      e[i].f -= u, e[i ^ 1].f += u;
      now -= u;
      if (!now) break;
    }
  }
  return flow - now;
}
bool modify() {
  int dis = 1 << 30;
  for (int x = 0; x <= t; ++x) {
    if (!f[x]) continue;
    for (int i = pre[x]; ~i; i = e[i].next) {
      int y = e[i].x;
      if (e[i].f && !f[y]) dis = min(dis, d[y] + e[i].c - d[x]);
    }
  }
  if (dis == 1 << 30) return 0;
  for (int x = 0; x <= t; ++x)
    if (f[x]) d[x] += dis;
  return 1;
}
pair<int, int> run() {
  maxflow = 0, ans = 0;
  Bellman_Ford();
  while (1) {
    while (1) {
      memset(f, 0, sizeof(f));
      if (!zkwpush(s)) break;
    }
    if (!modify()) break;
  }
  return make_pair(maxflow, ans);
}
};  // namespace MCMF
const int MAXN = 1010;
int N, M, K;
int A[MAXN];
int W[MAXN];
int Z[MAXN];
int H[MAXN];
int first;
void read_data() {
  scanf("%d %d", &N, &K);
  for (int(i) = (0); (i) < (N); (i)++) scanf("%d", A + i);
  map<int, int> MM;
  for (int(i) = (0); (i) < (N); (i)++) MM[A[i]] = 0;
  int id = 0;
  for (auto& m : MM) m.second = id++;
  for (int(i) = (0); (i) < (N); (i)++) {
    W[i] = __builtin_popcount(A[i]);
    Z[i] = A[i];
    A[i] = MM[A[i]];
    H[A[i]] = Z[i];
  }
  M = int(MM.size());
}
int encode(int x, int y) { return x + (M + 1) * y; }
pair<int, int> decode(int k) { return make_pair(k % (M + 1), k / (M + 1)); }
const int SMALLINF = 10000;
int U[MAXN];
void solve() {
  int S = (M + 1) * (2 * N + 1) + 1;
  int T = S + 1;
  MCMF::init(T + 10, S, T);
  for (int(k) = (0); (k) < (N); (k)++) {
    for (int(i) = (0); (i) <= (M); (i)++)
      for (int(j) = (0); (j) <= (M); (j)++)
        if (j == A[k] or i == j) {
          int w = (i == j) ? 0 : __builtin_popcount(H[j]);
          int c = (i == M and j == M) ? K : 1;
          MCMF::add_edge(encode(i, k * 2), encode(j, k * 2 + 1), c, w);
        }
  }
  for (int(k) = (0); (k) < (N); (k)++) {
    for (int(i) = (0); (i) <= (M); (i)++) {
      int c = (i == M) ? K : 1;
      int w = (i == A[k]) ? 0 : SMALLINF;
      MCMF::add_edge(encode(i, 2 * k + 1), encode(i, 2 * k + 2), c, w);
    }
  }
  MCMF::add_edge(S, encode(M, 0), K, 0);
  for (int(i) = (0); (i) <= (M); (i)++)
    MCMF::add_edge(encode(i, 2 * N), T, K, 0);
  auto t = MCMF::run();
  int cost = t.second;
  cost %= SMALLINF;
  vector<pair<int, int>> VV;
  for (auto m : MCMF::flows()) {
    int p = m.first.first;
    int q = m.first.second;
    int f = m.second;
    if (f == 0) continue;
    if (p == S or q == S or p == T or q == T) continue;
    pair<int, int> x = decode(p);
    pair<int, int> y = decode(q);
    if (x.first == y.first) continue;
    VV.push_back(make_pair(x.first, y.first));
  }
  reverse(VV.begin(), VV.end());
  printf("%d %d\n", int(VV.size()) + N, cost);
  for (int(i) = (0); (i) < (K); (i)++) U[i] = M;
  for (int(i) = (0); (i) < (N); (i)++) {
    int id = -1;
    while (id == -1) {
      for (int(j) = (0); (j) < (K); (j)++)
        if (U[j] == A[i]) {
          id = j;
        }
      if (id == -1) {
        int x = VV.back().first;
        int y = VV.back().second;
        VV.pop_back();
        for (int(j) = (0); (j) < (K); (j)++)
          if (U[j] == x) {
            U[j] = y;
            printf("%c=%d\n", char('a' + j), H[y]);
            break;
          }
      }
    }
    printf("print(%c)\n", char('a' + id));
  }
}
int main() {
  read_data();
  solve();
}