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;
template <typename T, size_t N>
int SIZE(const T (&t)[N]) {
  return N;
}
template <typename T>
int SIZE(const T &t) {
  return t.size();
}
string to_string(const string s, int x1 = 0, int x2 = 1e9) {
  return '"' + ((x1 < s.size()) ? s.substr(x1, x2 - x1 + 1) : "") + '"';
}
string to_string(const char *s) { return to_string((string)s); }
string to_string(const bool b) { return (b ? "true" : "false"); }
string to_string(const char c) { return string({c}); }
template <size_t N>
string to_string(const bitset<N> &b, int x1 = 0, int x2 = 1e9) {
  string t = "";
  for (int __iii__ = min(x1, SIZE(b)), __jjj__ = min(x2, SIZE(b) - 1);
       __iii__ <= __jjj__; ++__iii__) {
    t += b[__iii__] + '0';
  }
  return '"' + t + '"';
}
template <typename A, typename... C>
string to_string(const A(&v), int x1 = 0, int x2 = 1e9, C... coords);
int l_v_l_v_l = 0, t_a_b_s = 0;
template <typename A, typename B>
string to_string(const pair<A, B> &p) {
  l_v_l_v_l++;
  string res = "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
  l_v_l_v_l--;
  return res;
}
template <typename A, typename... C>
string to_string(const A(&v), int x1, int x2, C... coords) {
  int rnk = rank<A>::value;
  string tab(t_a_b_s, ' ');
  string res = "";
  bool first = true;
  if (l_v_l_v_l == 0) res += '\n';
  res += tab + "[";
  x1 = min(x1, SIZE(v)), x2 = min(x2, SIZE(v));
  auto l = begin(v);
  advance(l, x1);
  auto r = l;
  advance(r, (x2 - x1) + (x2 < SIZE(v)));
  for (auto e = l; e != r; e = next(e)) {
    if (!first) {
      res += ", ";
    }
    first = false;
    l_v_l_v_l++;
    if (e != l) {
      if (rnk > 1) {
        res += '\n';
        t_a_b_s = l_v_l_v_l;
      };
    } else {
      t_a_b_s = 0;
    }
    res += to_string(*e, coords...);
    l_v_l_v_l--;
  }
  res += "]";
  if (l_v_l_v_l == 0) res += '\n';
  return res;
}
void dbgm() { ; }
template <typename Heads, typename... Tails>
void dbgm(Heads H, Tails... T) {
  cout << to_string(H) << " | ";
  dbgm(T...);
}
const long long INFFLOW = 1e18;
const long long INFCOST = 1e18;
struct MCF {
  int n;
  vector<long long> prio, pot;
  vector<long long> curflow;
  vector<int> prevedge, prevnode;
  priority_queue<pair<long long, int>, vector<pair<long long, int>>,
                 greater<pair<long long, int>>>
      q;
  struct edge {
    int to, rev;
    long long f, cap;
    long long cost;
  };
  vector<vector<edge>> g;
  MCF(int n)
      : n(n), prio(n), curflow(n), prevedge(n), prevnode(n), pot(n), g(n) {}
  void add_edge(int s, int t, long long cap, long long cost) {
    g[s].push_back((edge){t, ((int)g[t].size()), 0, cap, cost});
    g[t].push_back((edge){s, ((int)g[s].size()) - 1, 0, 0, -cost});
  }
  pair<long long, long long> get_flow(int s, int t) {
    long long flow = 0;
    long long flowcost = 0;
    while (1) {
      q.push({0, s});
      fill(prio.begin(), prio.end(), INFCOST);
      prio[s] = 0;
      curflow[s] = INFFLOW;
      while (!q.empty()) {
        auto cur = q.top();
        long long d = cur.first;
        int u = cur.second;
        q.pop();
        if (d != prio[u]) continue;
        for (int i = 0; i < ((int)g[u].size()); ++i) {
          edge &e = g[u][i];
          int v = e.to;
          if (e.cap <= e.f) continue;
          long long nprio = prio[u] + e.cost + pot[u] - pot[v];
          if (prio[v] > nprio) {
            prio[v] = nprio;
            q.push({nprio, v});
            prevnode[v] = u;
            prevedge[v] = i;
            curflow[v] = min(curflow[u], e.cap - e.f);
          }
        }
      }
      if (prio[t] == INFCOST) break;
      for (int i = 0; i < n; i++) pot[i] += prio[i];
      long long df = min(curflow[t], INFFLOW - flow);
      flow += df;
      for (int v = t; v != s; v = prevnode[v]) {
        edge &e = g[prevnode[v]][prevedge[v]];
        e.f += df;
        g[v][e.rev].f -= df;
        flowcost += df * e.cost;
      }
    }
    return {flow, flowcost};
  }
};
int main() {
  int n, m;
  cin >> n >> m;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int N = 2 * n;
  MCF mcf(N + 3);
  mcf.add_edge(N, N + 1, m, 0);
  mcf.add_edge(N + 1, N + 2, m, 0);
  for (int i = 0; i < n; i++) {
    int me = 2 * i;
    int other = me + 1;
    mcf.add_edge(N + 1, me, 1, __builtin_popcount(a[i]));
    mcf.add_edge(me, other, 1, -1e9);
    mcf.add_edge(other, N + 2, 1, 0);
    for (int j = i + 1; j < n; j++) {
      mcf.add_edge(other, 2 * j, 1,
                   a[i] == a[j] ? 0 : __builtin_popcount(a[j]));
    }
  }
  mcf.get_flow(N, N + 2);
  long long res = 0;
  int x = 0;
  bool done[n];
  memset(done, 0, sizeof(done));
  int printedBy[n];
  memset(printedBy, -1, sizeof(printedBy));
  for (auto &e : mcf.g[N + 1])
    if (e.cap && e.f) {
      done[e.to / 2] = 1;
      printedBy[e.to / 2] = x++;
      res += e.cost;
    }
  for (int i = 0; i < n; i++)
    if (!done[i]) {
      for (auto &e : mcf.g[2 * i])
        if (!e.cap && e.f) {
          int parent = e.to / 2;
          assert(printedBy[parent] != -1);
          printedBy[i] = printedBy[parent];
          res -= e.cost;
        }
    }
  int currentVal[m];
  memset(currentVal, -1, sizeof(currentVal));
  vector<string> program;
  for (int i = 0; i < n; i++) {
    string x = string(1, printedBy[i] + 'a');
    if (currentVal[printedBy[i]] != a[i]) {
      program.push_back(x + "=" + to_string(a[i]));
    }
    program.push_back("print(" + x + ")");
    currentVal[printedBy[i]] = a[i];
  }
  cout << ((int)program.size()) << " " << res << '\n';
  for (auto x : program) cout << x << '\n';
  return 0;
}