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;
using lli = long long int;
using pii = pair<int, int>;
using vi = vector<int>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vlli = vector<long long int>;
using vpii = vector<pair<int, int>>;
class mcbm {
 public:
  int n, m, cost;
  vector<int> u, v, p, way, ans;
  vector<vector<int>> a;
  mcbm() {}
  mcbm(int n, int m)
      : n(n),
        m(m),
        u(n + 1, 0),
        v(m + 1, 0),
        p(m + 1, 0),
        way(m + 1, 0),
        ans(n + 1),
        a(n + 1, vector<int>(m + 1, 0x3f3f3f3f)) {}
  void match() {
    for (int i = 1; i <= n; ++i) {
      p[0] = i;
      int j0 = 0;
      vector<int> minv(m + 1, 0x3f3f3f3f);
      vector<char> used(m + 1, false);
      do {
        used[j0] = true;
        int i0 = p[j0], delta = 0x3f3f3f3f, j1;
        for (int j = 1; j <= m; ++j)
          if (!used[j]) {
            int cur = a[i0][j] - u[i0] - v[j];
            if (cur < minv[j]) minv[j] = cur, way[j] = j0;
            if (minv[j] < delta) delta = minv[j], j1 = j;
          }
        for (int j = 0; j <= m; ++j)
          if (used[j])
            u[p[j]] += delta, v[j] -= delta;
          else
            minv[j] -= delta;
        j0 = j1;
      } while (p[j0] != 0);
      do {
        int j1 = way[j0];
        p[j0] = p[j1];
        j0 = j1;
      } while (j0);
    }
    for (int j = 1; j <= m; ++j) ans[p[j]] = j;
    cost = -v[0];
  }
  int get_cost() { return cost; }
  vector<int> get_assignment() { return ans; }
};
int fx(int x) {
  int res = 0;
  while (x) res += (x % 2), x /= 2;
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, N, M, a[300];
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i];
  N = n;
  M = n + m;
  mcbm f(N, M);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j < i; j++)
      if (a[i] != a[j])
        f.a[i][j] = fx(a[i]);
      else
        f.a[i][j] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) f.a[i][j + n] = fx(a[i]);
  f.match();
  vi temp = f.get_assignment();
  map<int, char> var;
  int lines = 0;
  for (int i = 1; i <= n; i++)
    if (temp[i] > n) {
      var[i] = (temp[i] - n - 1 + 'a');
      lines += 2;
    } else {
      var[i] = var[temp[i]];
      if (a[i] == a[temp[i]])
        lines++;
      else
        lines += 2;
    }
  cout << lines << " " << f.get_cost() << '\n';
  for (int i = 1; i <= n; i++)
    if (temp[i] > n) {
      cout << var[i] << "=" << a[i] << '\n';
      cout << "print(" << var[i] << ")" << '\n';
    } else {
      if (a[i] == a[temp[i]])
        cout << "print(" << var[i] << ")" << '\n';
      else {
        cout << var[i] << "=" << a[i] << '\n';
        cout << "print(" << var[i] << ")" << '\n';
      }
    }
}