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;
typedef vector<long long> VD;
long long eps = 1e-9;
long long MinCostMatching(const vector<VD> &cost, vector<int> &Lmate,
                          vector<int> &Rmate) {
  int n = int(cost.size());
  VD u(n);
  VD v(n);
  for (int i = 0; i < n; i++) {
    u[i] = cost[i][0];
    for (int j = 1; j < n; j++) u[i] = min(u[i], cost[i][j]);
  }
  for (int j = 0; j < n; j++) {
    v[j] = cost[0][j] - u[0];
    for (int i = 1; i < n; i++) v[j] = min(v[j], cost[i][j] - u[i]);
  }
  Lmate = vector<int>(n, -1);
  Rmate = vector<int>(n, -1);
  int mated = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (Rmate[j] != -1) continue;
      if (fabs(cost[i][j] - u[i] - v[j]) < 1e-10) {
        Lmate[i] = j;
        Rmate[j] = i;
        mated++;
        break;
      }
    }
  }
  VD dist(n);
  vector<int> dad(n);
  vector<int> seen(n);
  while (mated < n) {
    int s = 0;
    while (Lmate[s] != -1) s++;
    fill(dad.begin(), dad.end(), -1);
    fill(seen.begin(), seen.end(), 0);
    for (int k = 0; k < n; k++) dist[k] = cost[s][k] - u[s] - v[k];
    int j = 0;
    while (true) {
      j = -1;
      for (int k = 0; k < n; k++) {
        if (seen[k]) continue;
        if (j == -1 || dist[k] < dist[j]) j = k;
      }
      seen[j] = 1;
      if (Rmate[j] == -1) break;
      const int i = Rmate[j];
      for (int k = 0; k < n; k++) {
        if (seen[k]) continue;
        const long long new_dist = dist[j] + cost[i][k] - u[i] - v[k];
        if (dist[k] > new_dist) {
          dist[k] = new_dist;
          dad[k] = j;
        }
      }
    }
    for (int k = 0; k < n; k++) {
      if (k == j || !seen[k]) continue;
      const int i = Rmate[k];
      v[k] += dist[k] - dist[j];
      u[i] -= dist[k] - dist[j];
    }
    u[s] += dist[j];
    while (dad[j] >= 0) {
      const int d = dad[j];
      Rmate[j] = Rmate[d];
      Lmate[Rmate[j]] = j;
      j = d;
    }
    Rmate[j] = s;
    Lmate[s] = j;
    mated++;
  }
  long long value = 0;
  for (int i = 0; i < n; i++) value += cost[i][Lmate[i]];
  return value;
}
long long inf = 1000000000ll;
int bits(long long x) {
  int ans = 0;
  while (x) {
    if (x & 1) ans++;
    x = x >> 1;
  }
  return ans;
}
string rev(string x) {
  string ans = "";
  int l = x.length();
  for (int i = l - 1; i >= 0; i--) {
    ans += x[i];
  }
  return ans;
}
string tos(int x) {
  string ans = "";
  while (x) {
    ans += '0' + x % 10;
    x /= 10;
  }
  return rev(ans);
}
int main() {
  int n, k;
  cin >> n >> k;
  int N = n + k;
  int arr[254];
  for (int i = 0; i < n; ++i) cin >> arr[i];
  vector<vector<long long> > cost(N, vector<long long>(N, inf));
  for (int i = 0; i < k; ++i) {
    for (int j = k; j < N; ++j) {
      cost[i][j] = bits(arr[j - k]);
    }
  }
  for (int i = k; i < N; ++i) {
    for (int j = i + 1; j < N; ++j) {
      cost[i][j] = bits(arr[j - k]);
      if (arr[i - k] == arr[j - k]) cost[i][j] = 0;
    }
  }
  vector<int> lm(n), rm(n);
  MinCostMatching(cost, lm, rm);
  vector<int> var(n, -1);
  for (int i = k; i < N; ++i) {
    int prv = rm[i];
    if (prv < k) {
      var[i - k] = prv;
    } else {
      var[i - k] = var[prv - k];
    }
  }
  int op = 0;
  vector<int> val(k, -1);
  vector<string> ans;
  for (int i = 0; i < n; ++i) {
    string now = "";
    if (val[var[i]] == arr[i]) {
      now = "print(";
      now += (char)(var[i] + 'a');
      now += ")";
    } else {
      now += (var[i] + 'a');
      now += "=" + tos(arr[i]);
      ans.push_back(now);
      now = "print(";
      now += (char)(var[i] + 'a');
      now += ")";
      op += bits(arr[i]);
    }
    val[var[i]] = arr[i];
    ans.push_back(now);
  }
  cout << ans.size() << " " << op << endl;
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << endl;
  return 0;
}