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;
int const N = 550;
int const INF = (int)1e9 + 10;
int k, s, t;
int n, m;
vector<int> e[N], f[N], c[N];
vector<int> cost[N], rev[N];
int a[N];
int dist[N], pre[N];
int letter[N], prele[N];
int val[N];
int cnt, ans;
int id[N];
void add(int v, int to, int cap, int co) {
  f[v].push_back(0);
  f[to].push_back(0);
  c[v].push_back(cap);
  c[to].push_back(0);
  rev[v].push_back((int)e[to].size());
  rev[to].push_back((int)e[v].size());
  cost[v].push_back(co);
  cost[to].push_back(-co);
  e[v].push_back(to);
  e[to].push_back(v);
}
void build() {
  s = n + n + m;
  t = s + 1;
  k = t + 1;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      int cost = int(a[i] != a[j]) * __builtin_popcount(a[j]);
      add(i + m, j + n + m, 1, cost);
    }
    add(s, i + m, 1, 0);
    add(i + n + m, t, 1, 0);
  }
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < n; ++j) {
      add(i, j + n + m, 1, __builtin_popcount(a[j]));
    }
    add(s, i, 1, 0);
  }
  memset(letter, -1, sizeof(letter));
  memset(prele, -1, sizeof(prele));
}
bool levit() {
  memset(dist, 63, sizeof(dist));
  memset(pre, -1, sizeof(pre));
  dist[s] = 0;
  pre[s] = 0;
  deque<int> q;
  q.push_back(s);
  memset(id, 0, sizeof(id));
  while (!q.empty()) {
    int v = q.front();
    q.pop_front();
    id[v] = 1;
    for (int i = 0; i < (int)e[v].size(); ++i) {
      int to = e[v][i];
      int d = dist[v] + cost[v][i];
      if (d < dist[to] && f[v][i] < c[v][i]) {
        dist[to] = d;
        pre[to] = rev[v][i];
        if (id[to] == 0) {
          q.push_back(to);
        } else if (id[to] == 1) {
          q.push_front(to);
        }
        id[to] = 1;
      }
    }
  }
  return dist[t] < INF;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
  }
  build();
  while (levit()) {
    int flow = INF;
    for (int to = t; to != s;) {
      int j = pre[to];
      int i = rev[to][j];
      int v = e[to][j];
      flow = min(flow, c[v][i] - f[v][i]);
      if (v < m) {
        letter[to - n - m] = v;
        prele[to - n - m] = -1;
      }
      if (m <= v && v < m + n) {
        prele[to - n - m] = v - m;
      }
      to = v;
    }
    for (int to = t; to != s;) {
      int j = pre[to];
      int i = rev[to][j];
      int v = e[to][j];
      f[v][i] += flow;
      f[to][j] -= flow;
      to = v;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (prele[i] != -1) {
      letter[i] = letter[prele[i]];
    }
  }
  cnt = n;
  memset(val, -1, sizeof(val));
  for (int i = 0; i < n; ++i) {
    int x = letter[i];
    if (val[x] != a[i]) {
      ++cnt;
      val[x] = a[i];
      ans += __builtin_popcount(a[i]);
    }
  }
  printf("%d %d\n", cnt, ans);
  memset(val, -1, sizeof(val));
  for (int i = 0; i < n; ++i) {
    int x = letter[i];
    if (val[x] != a[i]) {
      printf("%c=%d\n", char(x + 'a'), a[i]);
      val[x] = a[i];
    }
    printf("print(%c)\n", char(x + 'a'));
  }
  return 0;
}