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;
struct Edge {
  int idx, f, w;
  Edge* next;
  Edge* opp;
};
Edge adj[605], memo[605 * 605];
int f[600], a[600];
int n, m, s, t;
int mset, ans;
int dist[605];
Edge* pre[605];
int top, mark[600], last[600];
char ret[1010][30];
void addEdgeProcess(int a, int b, int c, int w) {
  Edge* ptr = &memo[mset++];
  ptr->idx = b;
  ptr->f = c;
  ptr->w = w;
  ptr->next = adj[a].next;
  adj[a].next = ptr;
}
void addEdge(int a, int b, int c, int w) {
  addEdgeProcess(a, b, c, w);
  addEdgeProcess(b, a, 0, -w);
  adj[a].next->opp = &memo[mset - 1];
  adj[b].next->opp = &memo[mset - 2];
}
bool spfa() {
  for (int i = s; i <= t; ++i) dist[i] = 1000000000;
  dist[s] = 0;
  bool flag = 1;
  for (int x = s; x < t && flag; ++x) {
    flag = 0;
    for (int i = s; i <= t; ++i) {
      Edge* ptr = adj[i].next;
      while (ptr) {
        if (ptr->f <= 0) {
          ptr = ptr->next;
          continue;
        }
        int k = ptr->idx;
        if (dist[i] + ptr->w < dist[k]) {
          dist[k] = dist[i] + ptr->w;
          pre[k] = ptr;
          flag = 1;
        }
        ptr = ptr->next;
      }
    }
  }
  return (dist[t] < 1000000000);
}
void add_Path() {
  int k = t, Min = 1000000000;
  Edge* ptr;
  while (k != s) {
    ptr = pre[k];
    if (ptr->f < Min) Min = ptr->f;
    k = ptr->opp->idx;
  }
  k = t;
  while (k != s) {
    ptr = pre[k];
    ptr->f -= Min;
    ptr->opp->f += Min;
    k = ptr->opp->idx;
  }
  ans += Min * dist[t];
}
void solve() {
  ans = 0;
  while (spfa()) {
    add_Path();
  }
  top = 0;
  memset(mark, -1, sizeof mark);
  memset(last, -1, sizeof last);
  for (int i = 1; i <= m; ++i) {
    for (Edge* ptr = adj[i + n].next; ptr; ptr = ptr->next) {
      if (ptr->idx == s) continue;
      int k = ptr->idx - n - m;
      if (ptr->opp->f) {
        mark[k] = i;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (Edge* ptr = adj[i].next; ptr; ptr = ptr->next) {
      if (ptr->idx == s) continue;
      int k = ptr->idx - n - m;
      if (ptr->opp->f) {
        mark[k] = mark[i];
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    char ch = 'a' + mark[i] - 1;
    if (last[mark[i]] != a[i]) {
      sprintf(ret[top++], "%c=%d\n", ch, a[i]);
    }
    sprintf(ret[top++], "print(%c)\n", ch);
    last[mark[i]] = a[i];
  }
  printf("%d %d\n", top, ans);
  for (int i = 0; i < top; ++i) printf("%s", ret[i]);
}
void init() {
  s = 0, t = m + 2 * n + 1;
  mset = 0;
  for (int i = s; i <= t; ++i) adj[i].next = NULL;
  for (int i = 1; i < n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      if (a[i] == a[j])
        addEdge(i, j + n + m, 1, 0);
      else
        addEdge(i, j + n + m, 1, f[j]);
    }
  }
  for (int i = 1; i <= m; ++i) {
    for (int j = 1; j <= n; ++j) {
      addEdge(i + n, j + n + m, 1, f[j]);
    }
  }
  for (int i = 1; i <= n + m; ++i) addEdge(s, i, 1, 0);
  for (int i = 1; i <= n; ++i) addEdge(i + n + m, t, 1, 0);
}
int calc(int n) {
  if (n == 0) return 0;
  int ans = 0;
  for (; n; n -= (n & -n)) ans++;
  return ans;
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    for (int i = 1; i <= n; ++i) {
      scanf("%d", &a[i]);
      f[i] = calc(a[i]);
    }
    init();
    solve();
  }
  return 0;
}