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>
#pragma comment(linker, "/STACK:65777216")
using namespace std;
int nb(int x) { return x == 0 ? 0 : 1 + nb(x & (x - 1)); }
int n, m;
int a[555];
vector<pair<int, int> > v[666];
const int inf = 1011111111;
int d[666];
int f[666];
int flow() {
  int N = 2 * n + m + 2;
  for (int i(0); i < (N); i++) d[i] = inf;
  int start = N - 2;
  d[start] = 0;
  priority_queue<pair<int, int> > q;
  q.push(pair<int, int>(0, start));
  while (!q.empty()) {
    pair<int, int> curr = q.top();
    q.pop();
    int ver = curr.second;
    int cost = -curr.first;
    if (d[ver] < cost) continue;
    for (int i(0); i < (v[ver].size()); i++) {
      int nw = v[ver][i].first;
      int ncost = cost + v[ver][i].second;
      if (d[nw] > ncost) {
        d[nw] = ncost;
        f[nw] = ver;
        q.push(pair<int, int>(-ncost, nw));
      }
    }
  }
  int curr = N - 1;
  while (curr != N - 2) {
    int prev = f[curr];
    bool found = false;
    for (int i(0); i < (v[prev].size()); i++)
      if (v[prev][i].first == curr) {
        swap(v[prev][i], v[prev].back());
        int cost = v[prev].back().second;
        v[prev].pop_back();
        v[curr].push_back(pair<int, int>(prev, -cost));
        found = true;
        break;
      }
    if (!found) puts("FACK");
    curr = prev;
  }
  return d[N - 1];
}
string conv(int a) {
  stringstream ss;
  ss << a;
  return ss.str();
}
string var[333];
int main() {
  cin >> n >> m;
  for (int i(0); i < (n); i++) cin >> a[i];
  for (int i(0); i < (n); i++)
    for (int j(i + 1); j < (n); j++)
      if (a[i] == a[j])
        v[i].push_back(pair<int, int>(n + m + j, 0));
      else
        v[i].push_back(pair<int, int>(n + m + j, nb(a[j])));
  for (int i(0); i < (m); i++)
    for (int j(0); j < (n); j++)
      v[n + i].push_back(pair<int, int>(n + m + j, nb(a[j])));
  for (int i(0); i < (n + m); i++) v[2 * n + m].push_back(pair<int, int>(i, 0));
  for (int i(0); i < (n); i++)
    v[n + m + i].push_back(pair<int, int>(2 * n + m + 1, 0));
  if (0)
    for (int i(0); i < (2 * n + m + 2); i++) {
      cout << "ver " << i << ": ";
      for (int j(0); j < (v[i].size()); j++)
        cout << v[i][j].first << ',' << v[i][j].second << " ";
      puts("");
    }
  int cost = 0;
  for (int tt(0); tt < (n); tt++) cost += flow();
  vector<string> res;
  for (int i(0); i < (n); i++) {
    int from = v[n + m + i][0].first;
    if (from >= n) {
      var[i] = string(1, char('a' + from - n));
      res.push_back(var[i] + "=" + conv(a[i]));
    } else {
      var[i] = var[from];
      if (a[i] != a[from]) res.push_back(var[i] + "=" + conv(a[i]));
    }
    res.push_back("print(" + var[i] + ")");
  }
  cout << res.size() << ' ' << cost << endl;
  for (int i(0); i < (res.size()); i++) cout << res[i] << endl;
  return 0;
}