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 Edge {
  int u, v;
  long long c, w;
};
vector<Edge> edges;
const int N = 550;
const long long inf = 9e18;
vector<int> G[N];
void AddEdge(int u, int v, long long c, long long w) {
  G[u].push_back(edges.size());
  edges.push_back((Edge){u, v, c, w});
  G[v].push_back(edges.size());
  edges.push_back((Edge){v, u, 0, -w});
}
long long dist[N];
int go[N];
bool in[N];
int s, t;
bool spfa() {
  for (int i = s; i <= t; i++) dist[i] = inf, in[i] = 0;
  queue<int> q;
  q.push(s);
  dist[s] = 0;
  in[s] = 1;
  while (q.size()) {
    int u = q.front();
    q.pop();
    in[u] = 0;
    for (int e : G[u]) {
      int v = edges[e].v;
      long long w = edges[e].w;
      if (edges[e].c > 0 && dist[v] > dist[u] + w) {
        dist[v] = dist[u] + w;
        go[v] = e;
        if (!in[v]) q.push(v), in[v] = 1;
      }
    }
  }
  return dist[t] != inf;
}
long long MCMF(int k) {
  long long ans = 0;
  while (k-- && spfa()) {
    for (int u = t; u != s; u = edges[go[u]].u) {
      edges[go[u]].c--;
      edges[go[u] ^ 1].c++;
    }
    ans += dist[t];
  }
  return ans;
}
const long long lim = 1e12;
int a[N], b[26], c[26];
string ans;
int lines, cost;
void P(int j) {
  ans += "print(";
  ans += 'a' + j;
  ans += ")\n";
  lines++;
}
void A(int j, int x) {
  ans += 'a' + j;
  ans += "=";
  ans += to_string(x);
  ans += "\n";
  lines++;
  cost += __builtin_popcount(x);
  b[j] = x;
}
int use[N];
int main() {
  int n, m;
  scanf("%i %i", &n, &m);
  s = 1;
  t = n * 2;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%i", &a[i]);
    AddEdge(i * 2 - 1, i * 2, 1, -lim);
    AddEdge(i * 2 - 1, i * 2, m, 0);
    if (i < n) AddEdge(i * 2, i * 2 + 1, m, 0);
    ans += __builtin_popcount(a[i]);
    for (int j = i - 1; j >= 1; j--) {
      if (a[i] == a[j]) {
        AddEdge(j * 2, i * 2 - 1, 1, -__builtin_popcount(a[i]));
        use[j] = edges.size() - 1;
        break;
      }
    }
  }
  ans += MCMF(m) + lim * n;
  for (int i = 1; i <= n; i++) {
    bool ok = 0;
    for (int j = 0; j < 26; j++) {
      if (b[j] == a[i]) {
        P(j);
        c[j] = i;
        ok = 1;
        break;
      }
    }
    if (ok) continue;
    for (int j = 0; j < 26; j++) {
      if (!use[c[j]] || edges[use[c[j]]].c == 0) {
        A(j, a[i]);
        P(j);
        c[j] = i;
        break;
      }
    }
  }
  assert(ans == cost);
  printf("%i %i\n", lines, ans);
  cout << ::ans;
  return 0;
}