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;
const int INF = 1000000002;
const long long INFLL = 100000000000000000ll;
const long long MOD = 1000000007;
struct NetworkFlowWithCost {
  struct edge {
    int a, b, cap, cost;
    edge(int p1, int p2, int p3, int p4) : a(p1), b(p2), cap(p3), cost(p4){};
  };
  const int INF = 2147483647;
  int s, t;
  vector<edge> edges;
  vector<int> best, from;
  vector<vector<int>> e;
  NetworkFlowWithCost(int sz) {
    best.resize(sz + 1);
    e.resize(sz + 1);
    from.resize(sz + 1);
  }
  void setSource(int n) { s = n; }
  void setSink(int n) { t = n; }
  void addEdge(int a, int b, int _cap, int _cost) {
    edges.push_back(edge(a, b, _cap, _cost));
    e[a].push_back(((int)edges.size()) - 1);
    edges.push_back(edge(b, a, 0, -_cost));
    e[b].push_back(((int)edges.size()) - 1);
  }
  bool dijkstra() {
    fill(best.begin(), best.end(), INF);
    priority_queue<pair<int, int>, vector<pair<int, int>>,
                   greater<pair<int, int>>>
        q;
    best[s] = 0, q.push({0, s});
    while (!q.empty()) {
      pair<int, int> p = q.top();
      q.pop();
      int n = p.second, c = p.first;
      if (best[n] < c) continue;
      if (n == t) return true;
      for (int idx : e[n]) {
        edge &ed = edges[idx];
        if (ed.cap && c + ed.cost < best[ed.b]) {
          best[ed.b] = c + ed.cost;
          from[ed.b] = idx;
          q.push({best[ed.b], ed.b});
        }
      }
    }
    return best[t] < INF;
  }
  int minCostMaxFlow() {
    int c = 0;
    while (dijkstra()) {
      int ff = INF, n = t, prev = c;
      while (n != s) {
        edge &ed = edges[from[n]];
        c += ed.cost;
        ff = min(ff, ed.cap);
        n = ed.a;
      }
      n = t;
      while (n != s) {
        edge &ed = edges[from[n]];
        edge &rev = from[n] % 2 ? edges[from[n] - 1] : edges[from[n] + 1];
        ed.cap -= ff, rev.cap += ff;
        n = ed.a;
      }
    }
    return c;
  }
};
string Var[255];
int A[255], L, N;
vector<string> Ops[255];
int letter(int i) { return N + i; }
int node_left(int i) { return i; }
int node_right(int i) { return N + L + i; }
string tostr(int n) {
  if (n == 0) return "0";
  string ret;
  while (n) {
    ret += (char)(n % 10 + '0');
    n /= 10;
  }
  reverse(ret.begin(), ret.end());
  return ret;
}
int main() {
  cin >> N >> L;
  for (int i = (1); i <= (N); i++) cin >> A[i];
  int s = 0, t = N + L + N + 1;
  NetworkFlowWithCost g(N + L + N + 2);
  g.setSource(s);
  g.setSink(t);
  for (int i = (1); i <= (N); i++)
    for (int j = (i + 1); j <= (N); j++)
      g.addEdge(node_left(i), node_right(j), 1,
                A[i] == A[j] ? 0 : __builtin_popcount(A[j]));
  for (int l = (1); l <= (L); l++)
    for (int j = (1); j <= (N); j++)
      g.addEdge(letter(l), node_right(j), 1, __builtin_popcount(A[j]));
  for (int i = (1); i <= (N); i++)
    g.addEdge(s, node_left(i), 1, 0), g.addEdge(node_right(i), t, 1, 0);
  for (int i = (1); i <= (L); i++) g.addEdge(s, letter(i), 1, 0);
  int cost = g.minCostMaxFlow(), o = 0;
  for (int i = (N + 1); i <= (N + L); i++)
    for (int idx : g.e[i]) {
      if (g.edges[idx].cap == 0 && g.edges[idx].b > N + L) {
        char l = (char)('a' + i - N - 1);
        int j = g.edges[idx].b - N - L;
        Var[j] = l;
        Ops[j].push_back(Var[j] + "=" + tostr(A[j]));
        Ops[j].push_back("print(" + Var[j] + ")");
        o++;
      }
    }
  for (int i = (1); i <= (N); i++)
    for (int idx : g.e[i]) {
      if (g.edges[idx].b > N + L && g.edges[idx].cap == 0) {
        int j = g.edges[idx].b - N - L;
        if (A[i] != A[j]) Ops[j].push_back(Var[i] + "=" + tostr(A[j])), o++;
        Ops[j].push_back("print(" + Var[i] + ")");
        Var[j] = Var[i];
      }
    }
  cout << o + N << " " << cost << "\n";
  for (int i = (1); i <= (N); i++)
    for (string s : Ops[i]) cout << s << "\n";
}