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;
struct dat {
  int x, rev, f, cap, cos;
  dat(int x = 0, int rev = 0, int f = 0, int cap = 0, int cos = 0)
      : x(x), rev(rev), f(f), cap(cap), cos(cos) {}
};
priority_queue<pair<int, int> > q;
vector<dat> v[710];
void add(int x, int y, int ca, int co) {
  int n = v[x].size();
  int m = v[y].size();
  v[x].push_back(dat(y, m, 0, ca, co));
  v[y].push_back(dat(x, n, 0, 0, -co));
}
int Gas(int x) {
  int ans = 0;
  while (x) {
    if (x & 1) ans++;
    x /= 2;
  }
  return ans;
}
int a[710], b[710], vis[710], val[710], gas[710], dist[710], fl[710];
pair<int, int> pa[710];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    int x = a[i];
    gas[i] = Gas(x);
  }
  for (int i = 0; i < n; i++) b[i] = a[i + 1];
  sort(b, b + n);
  int K = unique(b, b + n) - b;
  for (int i = 1; i <= n; i++) a[i] = lower_bound(b, b + K, a[i]) - b;
  int so = 0;
  int de = m + n * 2 + 1;
  for (int i = 1; i <= m; i++) {
    add(so, i, 1, 0);
    add(i, de, 1, 0);
    for (int j = 1; j <= n; j++) add(i, m + j, 1, gas[j]);
  }
  for (int j = 1; j <= n; j++)
    for (int k = j + 1; k <= n; k++) {
      if (a[j] == a[k])
        add(m + n + j, m + k, 1, 0);
      else
        add(m + n + j, m + k, 1, gas[k]);
    }
  for (int j = 1; j <= n; j++) {
    add(m + j, m + n + j, 1, -1000);
    add(m + n + j, de, 1, 0);
  }
  int ans = 0;
  while (1) {
    for (int i = 0; i <= de; i++) dist[i] = 2100000, fl[i] = 0;
    dist[0] = 0;
    while (!q.empty()) q.pop();
    q.push(pair<int, int>(0, 0));
    fl[0] = 2100000;
    while (!q.empty()) {
      pair<int, int> ab = q.top();
      q.pop();
      int x = ab.second;
      int yy = -ab.first;
      if (yy != dist[x]) continue;
      for (int i = 0; i < v[x].size(); i++) {
        dat aa = v[x][i];
        if (aa.f == aa.cap) continue;
        int y = aa.x;
        if (dist[y] > dist[x] + aa.cos) {
          dist[y] = dist[x] + aa.cos;
          fl[y] = min(fl[x], aa.cap - aa.f);
          pa[y] = pair<int, int>(x, i);
          q.push(pair<int, int>(-dist[y], y));
        }
      }
    }
    if (!fl[de]) break;
    int xx = de;
    while (1) {
      pair<int, int> aa = pa[xx];
      int y = aa.first;
      int id = aa.second;
      v[y][id].f += fl[de];
      v[xx][v[y][id].rev].f -= fl[de];
      ans += v[y][id].cos * fl[de];
      if (y == so) break;
      xx = y;
    }
  }
  ans += 1000 * n;
  for (int i = 1; i <= n; i++) vis[i] = 0;
  for (int i = 1; i <= m; i++) {
    for (int j = 0; j < v[i].size(); j++) {
      dat aa = v[i][j];
      if (aa.f) {
        if (aa.x == de) continue;
        val[aa.x - m] = i;
        vis[aa.x - m] = 1;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < v[i + m + n].size(); j++) {
      dat aa = v[i + m + n][j];
      int k = aa.x;
      k -= m;
      if (k <= i) continue;
      if (aa.f) {
        val[k] = val[i];
        if (a[i] != a[k]) vis[k] = 1;
      }
    }
  }
  int ans1 = 0;
  for (int i = 1; i <= n; i++) ans1 += vis[i];
  printf("%d %d\n", ans1 + n, ans);
  for (int i = 1; i <= n; i++) {
    if (vis[i]) {
      printf("%c=%d\n", val[i] - 1 + 'a', b[a[i]]);
    }
    printf("print(%c)\n", val[i] - 1 + 'a');
  }
  return 0;
}