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 long long inf = 0x3f3f3f3f3f3f3f3f;
const long long N = 5000;
long long n, m, s, t;
vector<pair<long long, pair<long long, long long> > > nei[N + 1];
vector<long long> rv[N + 1];
void ae(long long x, long long y, long long c, long long w) {
  nei[x].push_back(make_pair(y, make_pair(c, w))),
      nei[y].push_back(make_pair(x, make_pair(0, -w)));
  rv[x].push_back(nei[y].size() - 1), rv[y].push_back(nei[x].size() - 1);
}
long long sumf[N + 1];
void ae(long long x, long long y, long long l, long long r, long long w) {
  ae(x, y, r - l, w);
  sumf[x] += l, sumf[y] -= l;
}
long long dis[N + 1], prv[N + 1];
bool inq[N + 1];
bool spfa() {
  memset(dis, 0x3f, sizeof(dis));
  memset(inq, 0, sizeof(inq));
  dis[s] = 0;
  queue<long long> q;
  q.push(s), inq[s] = true;
  while (q.size()) {
    long long x = q.front();
    q.pop(), inq[x] = false;
    for (long long i = 0; i < nei[x].size(); i++) {
      long long y = nei[x][i].first, &c = nei[x][i].second.first,
                w = nei[x][i].second.second;
      if (c && dis[x] + w < dis[y]) {
        dis[y] = dis[x] + w, prv[y] = rv[x][i];
        if (!inq[y]) q.push(y), inq[y] = true;
      }
    }
  }
  return dis[t] < inf;
}
pair<long long, long long> ek() {
  long long resf = 0, resw = 0;
  while (spfa()) {
    long long flw = inf;
    for (long long i = t; i != s; i = nei[i][prv[i]].first)
      flw = min(flw, nei[nei[i][prv[i]].first][rv[i][prv[i]]].second.first);
    for (long long i = t; i != s; i = nei[i][prv[i]].first)
      nei[nei[i][prv[i]].first][rv[i][prv[i]]].second.first -= flw,
          nei[i][prv[i]].second.first += flw;
    resf += flw, resw += dis[t] * flw;
  }
  return make_pair(resf, resw);
}
long long a[N + 1];
long long nxt[N + 1];
long long id[N + 1];
signed main() {
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) scanf("%lld", a + i);
  s = 2 * n + 1, t = s + 2;
  for (long long i = 1; i <= n; i++)
    ae(s, i, inf, __builtin_popcount(a[i])), ae(i, i + n, 1, 1, 0),
        ae(i + n, t, inf, 0);
  for (long long i = 1; i <= n; i++)
    for (long long j = i + 1; j <= n; j++)
      ae(i + n, j, inf, a[i] == a[j] ? 0 : __builtin_popcount(a[j]));
  s++;
  ae(s, s - 1, m, 0);
  ae(t, s, inf, 0);
  s += 2, t += 2;
  for (long long i = 1; i < s; i++)
    if (sumf[i] < 0)
      ae(s, i, -sumf[i], 0);
    else
      ae(i, t, sumf[i], 0);
  pair<long long, long long> ans = ek();
  long long otp = ans.second;
  memset(prv, 0, sizeof(prv));
  for (long long i = 1; i <= n; i++)
    for (long long j = 0; j < nei[i + n].size(); j++)
      if (i < nei[i + n][j].first && nei[i + n][j].first <= n &&
          nei[i + n][j].second.first == inf - 1)
        nxt[i] = nei[i + n][j].first, prv[nei[i + n][j].first] = i;
  long long nowid = 0;
  for (long long i = 1; i <= n; i++)
    if (!prv[i]) {
      nowid++;
      for (long long j = i; j; j = nxt[j]) id[j] = nowid;
    }
  long long cnt = 0;
  for (long long i = 1; i <= n; i++) {
    if (!prv[i] || a[prv[i]] != a[i]) cnt++;
    cnt++;
  }
  cout << cnt << " " << otp << "\n";
  for (long long i = 1; i <= n; i++) {
    if (!prv[i] || a[prv[i]] != a[i])
      printf("%c=%lld\n", char('a' + id[i] - 1), a[i]);
    printf("print(%c)\n", char('a' + id[i] - 1));
  }
  return 0;
}