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)
import java.io.*;
import java.util.*;
import java.math.*;

public class TaskE {
	void Run() throws IOException {
		n=ReadInt();
		m=ReadInt();
		arr=new int[n];
		for(int i=0;i<n;++i)
			arr[i]=ReadInt();
		{
			Integer[] p=new Integer[n];
			for(int i=0;i<n;++i)
				p[i]=i;
			Arrays.sort(p, new Comparator<Integer>(){
				@Override
				public int compare(Integer arg0, Integer arg1) {
					return arr[arg0]-arr[arg1];
				}
			});
			//
			int prev=-1;
			k=0;
			List<Integer> lst=new LinkedList<Integer>();
			for(int i=0;i<n;++i)
				if(prev!=arr[p[i]]) {
					prev=arr[p[i]];
					lst.add(prev);
					arr[p[i]]=k++;
				} else
					arr[p[i]]=k-1;
			//
			vals=new int[k];
			k=0;
			for(int x : lst)
				vals[k++]=x;
		}
		cost=new int[k];
		for(int i=0;i<k;++i)
			cost[i]=Integer.bitCount(vals[i]);
		//
		Graph g=new Graph(2*n+4);
		int sink=0, tail=1;
		Graph.Edge[][] edges=new Graph.Edge[n][];
		Graph.Edge[] initEdges=new Graph.Edge[n];
		{
			int fsink=2, ftail=3;
			for(int i=0;i<n;++i) {
				initEdges[i]=g.AddEdge(fsink, 4+2*i, 1, cost[arr[i]]);
				edges[i]=new Graph.Edge[i];
				for(int j=0;j<i;++j)
					edges[i][j]=g.AddEdge(4+2*j+1, 4+2*i, 1, arr[j]==arr[i] ? 0 : cost[arr[i]]);
				g.AddEdge(4+2*i+1, ftail, 1, 0);
				g.AddEdge(4+2*i, tail, 1, 0);
				g.AddEdge(sink, 4+2*i+1, 1, 0);
			}
			g.AddEdge(ftail, fsink, m, 0);
		}
		{
			int cost=g.MinCostMaxFlow(sink, tail)[1];
			int ansCount=n;
			for(int i=0;i<n;++i)
				if(initEdges[i].flow==1)
					++ansCount;
			for(int i=0;i<n;++i)
				for(int j=0;j<i;++j)
					if(edges[i][j].flow==1) {
						if(arr[i]!=arr[j])
							++ansCount;
						break;
					}
			output.print(ansCount);
			output.print(" ");
			output.println(cost);
			{
				char ch='a';
				char[] vars=new char[n];
				for(int i=0;i<n;++i) {
					if(initEdges[i].flow==1) {
						output.print(ch);
						output.print("=");
						output.println(vals[arr[i]]);
						vars[i]=ch++;
					} else
						for(int j=0;j<i;++j)
							if(edges[i][j].flow==1) {
								if(arr[j]!=arr[i]) {
									output.print(vars[j]);
									output.print("=");
									output.println(vals[arr[i]]);	
								}
								vars[i]=vars[j];
								vars[j]=0;
								break;
							}
					output.print("print(");
					output.print(vars[i]);
					output.println(")");
				}
			}
		}
	}
	
	int n,m,k;
	int[] arr;
	int[] vals;
	int[] cost;

	public static void main(String[] args) throws IOException {
		boolean oj = System.getProperty("ONLINE_JUDGE") != null;
		Reader reader;
		reader=oj ? new InputStreamReader(System.in) : new FileReader("input.txt");
		input=new BufferedReader(reader);
		Writer writer=new OutputStreamWriter(System.out);
		writer=new BufferedWriter(writer);
		output=new PrintWriter(writer);
		new TaskE().Run();
		output.close();
	}
	
	static int ReadInt() throws IOException {
		return Integer.parseInt(ReadString());
	}
	
	static long ReadLong() throws IOException {
		return Long.parseLong(ReadString());
	}
	
	static String ReadString() throws IOException {
		while(tokenizer==null || !tokenizer.hasMoreTokens())
			tokenizer=new StringTokenizer(input.readLine());
		return tokenizer.nextToken();
	}
	
	static StringTokenizer tokenizer;
	static BufferedReader input;
	static PrintWriter output;
}

class Graph {
	class Edge {
		int u, v;
		int cap, flow, cost;
		Edge inv;
		
		Edge(int u, int v, int cap, int cost) {
			this.u=u;
			this.v=v;
			this.cap=cap;
			this.cost=cost;
		}
		
		int Cost() {
			return cost+phi[u]-phi[v];
		}
		
		int Cap() {
			return cap-flow;
		}
	}
	
	List<Edge>[] g;
	int n;
	int[] phi;
	
	Graph(int n) {
		this.n=n;
		g=(List<Edge>[])new List<?>[n];
		phi=new int[n];
		for(int i=0;i<n;++i)
			g[i]=new LinkedList<Edge>();
	}
	
	Edge AddEdge(int u, int v, int cap, int cost) {
		Edge eu=new Edge(u, v, cap, cost);
		Edge ev=new Edge(v, u, 0, -cost);
		eu.inv=ev;
		ev.inv=eu;
		g[u].add(eu);
		g[v].add(ev);
		return eu;
	}
	
	int[] MinCostMaxFlow(int sink, int tail) {
		int flow=0, cost=0;
		int[] d=new int[n];
		Edge[] path=new Edge[n];
		Dijkstra(sink, d, path);
		while(d[tail]<Integer.MAX_VALUE) {
			int tflow=Integer.MAX_VALUE;
			int tcost=0;
			for(int v=tail;v!=sink;v=path[v].u) {
				Edge e=path[v];
				tflow=Math.min(tflow, e.Cap());
				tcost+=e.cost;
			}
			flow+=tflow;
			cost+=tcost*tflow;
			for(int v=tail;v!=sink;v=path[v].u) {
				Edge e=path[v];
				e.flow+=tflow;
				e.inv.flow-=tflow;
			}
			for(int i=0;i<n;++i)
				if(d[i]<Integer.MAX_VALUE)
					phi[i]+=d[i];
			Dijkstra(sink, d, path);
		}
		return new int[]{flow, cost};
	}
	
	void Dijkstra(int sink, int[] d, Edge[] path) {
		Arrays.fill(d, Integer.MAX_VALUE);
		d[sink]=0;
		PriorityQueue<Pair> heap=new PriorityQueue<Pair>();
		heap.add(new Pair(sink, 0));
		while(!heap.isEmpty()) {
			Pair p=heap.poll();
			if(d[p.v]!=p.d)
				continue;
			for(Edge e : g[p.v])
				if(e.flow<e.cap) {
					int td=d[p.v]+e.Cost();
					if(td<d[e.v]) {
						d[e.v]=td;
						heap.add(new Pair(e.v, td));
						path[e.v]=e;
					}
				}
		}
	}
}

class Pair implements Comparable<Pair> {
	int v, d;
	Pair(int v, int d) {
		this.v=v;
		this.d=d;
	}
	@Override
	public int compareTo(Pair p) {
		return d-p.d;
	}
}