Problem: Kilani and Abd are neighbors for 3000 years, but then the day came and Kilani decided to move to another house. As a farewell gift, Kilani is going to challenge Abd with a problem written by their other neighbor with the same name Abd.

<image>

The problem is:

You are given a connected tree rooted at node 1.

You should assign a character a or b to every node in the tree so that the total number of a's is equal to x and the total number of b's is equal to n - x.

Let's define a string for each node v of the tree as follows: 

  * if v is root then the string is just one character assigned to v: 
  * otherwise, let's take a string defined for the v's parent p_v and add to the end of it a character assigned to v. 



You should assign every node a character in a way that minimizes the number of distinct strings among the strings of all nodes.

Input

The first line contains two integers n and x (1 ≤ n ≤ 10^5; 0 ≤ x ≤ n) — the number of vertices in the tree the number of a's.

The second line contains n - 1 integers p_2, p_3, ..., p_{n} (1 ≤ p_i ≤ n; p_i ≠ i), where p_i is the parent of node i.

It is guaranteed that the input describes a connected tree.

Output

In the first line, print the minimum possible total number of distinct strings.

In the second line, print n characters, where all characters are either a or b and the i-th character is the character assigned to the i-th node.

Make sure that the total number of a's is equal to x and the total number of b's is equal to n - x.

If there is more than one answer you can print any of them.

Example

Input


9 3
1 2 2 4 4 4 3 1


Output


4
aabbbbbba

Note

The tree from the sample is shown below:

<image>

The tree after assigning characters to every node (according to the output) is the following:

<image>

Strings for all nodes are the following: 

  * string of node 1 is: a
  * string of node 2 is: aa
  * string of node 3 is: aab
  * string of node 4 is: aab
  * string of node 5 is: aabb
  * string of node 6 is: aabb
  * string of node 7 is: aabb
  * string of node 8 is: aabb
  * string of node 9 is: aa



The set of unique strings is \{a, aa, aab, aabb\}, so the number of distinct strings is 4.

Solution (in CPP):

Solution:
#include<iostream>
#include<bitset>
#include<vector>
#include<map>
using namespace std;
const int maxn=1e5+1;
vector<int>G[maxn],V[maxn];
int h[maxn];
map<int,int>m;
int zi[maxn];
int all;
bitset<maxn>bs[6007];
void dfs(int x,int f,int d)
{
    if(G[x].size()==1)
        zi[d]++;
    h[d]++;
    all=max(all,d);
    for(int i=0; i<G[x].size(); i++)
    {
        int t=G[x][i];
        if(t==f)
            continue;
        dfs(t,x,d+1);
    }
}
bool visit[maxn];
void dfs2(int cnt,int x)
{
    if(cnt==0)
        return;
    // cout<<h[cnt]<<' '<<x-h[cnt]<<' '<<x<<endl;
    int Sze=h[V[cnt][0]];
    for(int i=0; i<V[cnt].size(); i++)
    {
        int t=V[cnt][i];
        if(h[t]>x||bs[cnt-1][x])
            break;
        visit[t]=true,x-=Sze;
    }
    dfs2(cnt-1,x);
}
bool ans[maxn];


void dfs3(int x,int f,int d)
{
    if(visit[d])
        ans[x]=1;
    for(int i=0; i<G[x].size(); i++)
    {
        int t=G[x][i];
        if(t==f)
            continue;

        dfs3(t,x,d+1);
    }
}
int n,x;
int A,B;
int now;
bool flag=0;
void dfs4(int x,int f,int d)
{
    bool fff=0;
    for(int i=0; i<G[x].size(); i++)
    {
        int t=G[x][i];
        if(t==f)
            continue;
        fff=1;
        dfs4(t,x,d+1);
    }
    if(flag&&d==now&&fff==0&&ans[x]==0)
        cout<<A<<endl;
    if(fff==0&&A>0&&ans[x]==0&&d==now)
        ans[x]=1,A--;
}
int noww=0;
int main()
{
    cin>>n>>x;
    for(int i=2; i<=n; i++)
    {
        int a;
        cin>>a;
        G[a].push_back(i);
        G[i].push_back(a);
    }
    dfs(1,0,1);
    for(int i=1; i<=all; i++)
        if(!m[h[i]])
        {
            m[h[i]]=++noww;
            V[noww].push_back(i);
        }
        else
            V[m[h[i]]].push_back(i);

    bs[0][0]=1;

    for(int i=1; i<=noww; i++)
    {
        bs[i]|=bs[i-1];
        int here=h[V[i][0]];
        for(int j=1; j<=V[i].size(); j++)
            bs[i]|=(bs[i-1]<<(j*here));
    }
    if(bs[noww][x])
    {
        cout<<all<<endl;
        dfs2(noww,x);
        dfs3(1,-1,1);
        for(int i=1; i<=n; i++)
            if(ans[i])
                cout<<'a';
            else
                cout<<'b';

    }
    else
    {
        if(n==100000&&x==4923)
            flag=0;
        cout<<all+1<<endl;
        int maxx=0;
        for(int i=1; i<=x; i++)
            if(bs[noww][i])
                maxx=i;
        A=x-maxx;
        if(flag)
            cout<<maxx<<endl;
        dfs2(noww,maxx);
        now=0;
        for(int i=1; i<=all; i++)
            if(zi[now]<zi[i]&&!visit[i])
                now=i;
        if(flag)
            cout<<now<<' '<<all<<endl;
        dfs4(1,0,1);
        dfs3(1,0,1);
        for(int i=1; i<=n; i++)
            if(ans[i])
                cout<<'a';
            else
                cout<<'b';
    }
}