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;
inline long long read() {
  long long x = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  return x * neg;
}
inline void print(long long x) {
  if (x < 0) {
    putchar('-');
    print(abs(x));
    return;
  }
  if (x <= 9)
    putchar(x + '0');
  else {
    print(x / 10);
    putchar(x % 10 + '0');
  }
}
inline long long qpow(long long x, long long e, long long _MOD) {
  long long ans = 1;
  while (e) {
    if (e & 1) ans = ans * x % _MOD;
    x = x * x % _MOD;
    e >>= 1;
  }
  return ans;
}
long long n = read(), m = read(), a[255];
long long head[100005], ecnt = 1;
struct edge {
  long long to, nxt, cap, cost;
} e[1000005];
inline void addedge(long long u, long long v, long long f, long long c) {
  e[++ecnt].to = v;
  e[ecnt].cap = f;
  e[ecnt].cost = c;
  e[ecnt].nxt = head[u];
  head[u] = ecnt;
}
bool vis[100005];
long long dist[100005], flow[100005], pre[100005], pos[100005];
inline bool spfa(long long s, long long t) {
  memset(vis, 1, sizeof(vis));
  memset(dist, 63, sizeof(dist));
  queue<long long> q;
  vis[s] = 0;
  dist[s] = 0;
  flow[s] = 0x3f3f3f3f3f3f3f3fll;
  q.push(s);
  while (!q.empty()) {
    long long x = q.front();
    vis[x] = true;
    for (long long i = head[x]; i; i = e[i].nxt) {
      long long y = e[i].to;
      if (e[i].cap > 0 && dist[y] > dist[x] + e[i].cost) {
        dist[y] = dist[x] + e[i].cost;
        pos[y] = x;
        pre[y] = i;
        flow[y] = min(flow[x], e[i].cap);
        if (vis[y]) {
          q.push(y);
          vis[y] = false;
        }
      }
    }
    q.pop();
  }
  return dist[t] < 0x3f3f3f3f3f3f3f3fll;
}
inline long long Dinic(long long s, long long t) {
  long long sum = 0;
  while (spfa(s, t)) {
    sum += flow[t] * dist[t];
    for (long long i = t; i != s; i = pos[i]) {
      e[pre[i]].cap -= flow[t];
      e[pre[i] ^ 1].cap += flow[t];
    }
  }
  return sum;
}
long long by[100005], used[30];
vector<pair<long long, long long> > d;
signed main() {
  for (long long i = 1; i <= n; i++) a[i] = read();
  for (long long i = 1; i <= n; i++) {
    addedge(i, i + n, 1, __builtin_popcount(a[i]));
    addedge(i + n, i, 0, -__builtin_popcount(a[i]));
    addedge(i + n, i + n + n, 1, -0x3f3f3f3f3fll);
    addedge(i + n, i + n + n, 0, 0x3f3f3f3f3fll);
    if (i != n) {
      addedge(i, i + 1, m, 0);
      addedge(i + 1, i, 0, 0);
      addedge(i + n + n, i + 1, 1, 0);
      addedge(i + 1, i + n + n, 0, 0);
    }
    for (long long j = i + 1; j <= n; j++) {
      if (a[j] == a[i]) {
        addedge(i + n + n, j + n, 1, 0);
        addedge(j + n, i + n + n, 0, 0);
        break;
      }
    }
  }
  addedge(0, 1, m, 0);
  addedge(1, 0, 0, 0);
  addedge(3 * n, 3 * n + 1, m, 0);
  addedge(3 * n + 1, 3 * n, 0, 0);
  addedge(n, 3 * n + 1, m, 0);
  addedge(3 * n + 1, n, 0, 0);
  long long ans = Dinic(0, 3 * n + 1) + 0x3f3f3f3f3fll * n;
  for (long long i = 1; i <= n; i++) {
    for (long long j = head[i + n]; j; j = e[j].nxt) {
      long long t = e[j].to;
      if (t == i) {
        if (e[j].cap == 1) {
          for (long long k = 0; k < m; k++) {
            if (!used[k]) {
              used[k] = 1;
              by[i] = k;
              d.push_back({k, a[i]});
              d.push_back({k, 0});
              break;
            }
          }
          break;
        }
      } else if (t != i + n * 2) {
        if (e[j].cap == 1) {
          by[i] = by[t - (n << 1)];
          d.push_back({by[i], 0});
          break;
        }
      }
    }
    for (long long j = head[i + n + n]; j; j = e[j].nxt) {
      long long t = e[j].to;
      if (t == i + 1) {
        if (e[j ^ 1].cap == 1) {
          used[by[i]] = 0;
        }
        break;
      }
    }
  }
  cout << d.size() << " " << ans << endl;
  for (__typeof(d.begin()) it = d.begin(); it != d.end(); it++) {
    if (it->second == 0) {
      cout << "print(" << char(it->first + 'a') << ")\n";
    } else {
      cout << char(it->first + 'a') << "=" << it->second << endl;
    }
  }
  return 0;
}