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 GCC optimize("O3")
using namespace std;
const int maxn = 603;
int n, m;
int a[maxn];
void read() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i];
}
struct edge {
  int to, cost, flow, cap, rev;
};
vector<edge> adj[maxn];
void add_edge(int a, int b, int cap, int cost) {
  adj[a].push_back({b, cost, 0, cap, (int)adj[b].size()});
  adj[b].push_back({a, -cost, 0, 0, (int)adj[a].size() - 1});
}
pair<int, int> par[maxn];
int dist[maxn];
bool is_inside[maxn];
bool spfa(int s, int t) {
  for (int i = s; i <= t; i++) dist[i] = INT_MAX, is_inside[i] = false;
  deque<int> dq;
  dq.push_back(s);
  dist[s] = 0;
  is_inside[s] = true;
  while (!dq.empty()) {
    int ver = dq.front();
    dq.pop_front();
    is_inside[ver] = false;
    for (int i = 0; i < (int)adj[ver].size(); i++) {
      auto e = adj[ver][i];
      if (e.flow < e.cap && dist[ver] + e.cost < dist[e.to]) {
        par[e.to] = {ver, i};
        dist[e.to] = dist[ver] + e.cost;
        if (is_inside[e.to]) continue;
        is_inside[e.to] = true;
        if (dq.empty() || dist[e.to] < dist[dq.front()])
          dq.push_front(e.to);
        else
          dq.push_back(e.to);
      }
    }
  }
  return dist[t] != INT_MAX;
}
int mincost_maxflow(int s, int t) {
  int ans = 0;
  while (spfa(s, t)) {
    int flow = INT_MAX;
    int ver = t;
    while (ver != s) {
      int nxt = par[ver].first;
      flow = min(
          flow, adj[nxt][par[ver].second].cap - adj[nxt][par[ver].second].flow);
      ver = nxt;
    }
    ans += dist[t] * flow;
    ver = t;
    while (ver != s) {
      int nxt = par[ver].first;
      adj[nxt][par[ver].second].flow += flow;
      adj[ver][adj[nxt][par[ver].second].rev].flow -= flow;
      ver = nxt;
    }
  }
  return ans;
}
int match[maxn];
int which[maxn];
void solve() {
  int s = 0, t = 2 * n + m + 1;
  for (int i = 1; i <= n; i++) add_edge(s, i, 1, 0);
  for (int i = 1; i <= m; i++) add_edge(s, n + i, 1, 0);
  for (int i = 1; i <= n; i++) add_edge(n + m + i, t, 1, 0);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      add_edge(i, n + m + j, 1, a[i] == a[j] ? 0 : __builtin_popcount(a[j]));
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= n; j++)
      add_edge(n + i, n + m + j, 1, __builtin_popcount(a[j]));
  int ans = mincost_maxflow(s, t);
  int cnt = n;
  for (int i = 1; i <= n; i++)
    for (auto j : adj[i])
      if (j.cap == 1 && j.flow == 1) {
        if (a[i] != a[j.to - n - m]) cnt++;
        match[j.to - n - m] = i;
      }
  for (int i = 1; i <= m; i++)
    for (auto j : adj[i + n])
      if (j.cap == 1 && j.flow == 1) {
        match[j.to - n - m] = i + n;
        cnt++;
      }
  cout << cnt << " " << ans << '\n';
  for (int i = 1; i <= n; i++) {
    if (match[i] <= n) {
      int curr = which[match[i]];
      if (a[i] != a[match[i]])
        cout << (char)(curr + 'a') << "=" << a[i] << '\n';
      cout << "print(" << (char)(curr + 'a') << ")" << '\n';
      which[i] = curr;
    } else {
      int curr = match[i] - n - 1;
      cout << (char)(curr + 'a') << "=" << a[i] << '\n';
      cout << "print(" << (char)(curr + 'a') << ")" << '\n';
      which[i] = curr;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  read();
  solve();
}