#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>

using namespace std;

struct interval
{
    int a,b;
};

interval path[110];
int vis[110];
vector<int> route[110];
bool flag=false;

void init()
{
    flag=false;
    for(int i=0;i<105;i++)
        route[i].clear();
    memset(vis,0,sizeof(vis));
}

bool judge(int i,int j)
{
    if(path[i].a<path[j].b&&path[i].a>path[j].a)
        return true;
    if(path[i].b>path[j].a&&path[i].b<path[j].b)
        return true;
    return false;
}

void dfs(int a,int b)
{
    int i;
    vis[a]=1;
    if(a==b){
        flag=true;
        return;
    }
    for(i=0;i<route[a].size();i++){
        int k=route[a][i];
        if(!vis[k])
            dfs(k,b);
    }
    return;
}

int main()
{
    int n;
    while(cin>>n){
        int cnt=1,i,j,k;
        init();
        for(i=0;i<n;i++){
            int t,a,b;
            scanf("%d%d%d",&t,&a,&b);
            if(t==1){
                path[cnt].a=a;
                path[cnt++].b=b;
            }
            else{
                for(j=1;j<cnt;j++)
                    for(k=j+1;k<cnt;k++){
                        if(judge(j,k))
                           route[j].push_back(k);
                        if(judge(k,j))
                           route[k].push_back(j);
                    }
                dfs(a,b);
                if(flag==true)cout<<"YES"<<endl;
                else cout<<"NO"<<endl;
                flag=false;
            }
        }
    }
    return 0;
}


#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>

const int N = 103;

struct Node
{
int l,r;
} inter[N];

bool vis[N];

int cnt = 0;

bool judge(int id_a,int id_b)
{
    if (inter[id_a].l > inter[id_b].l && inter[id_a].l < inter[id_b].r)
        return true;
    if (inter[id_a].r > inter[id_b].l && inter[id_a].r < inter[id_b].r)
        return true;
    else
        return false;
}

bool dfs(int id_s, int id_e)
{
    if(id_s == id_e)
        return true;
    vis[id_s] = true;
    for(int i =1; i <=cnt; i++)
    {
        if(!vis[i])
        {
            if(judge(id_s, i) && dfs(i, id_e))
                return true;
        }
    }
    return false;
}

int main()
{
    int n;
    int op, a, b;
    scanf("%d",&n);
    while(n--)
    {
        scanf("%d%d%d", &op, &a, &b);
        if(op == 1)
        {
            cnt++;
            inter[cnt].l = a;
            inter[cnt].r = b;
        }
        else if(op == 2)
        {
            memset(vis, false, sizeof(vis));
            if(dfs(a,b))
                puts("YES");
            else
                puts("NO");
        }
    }
    return 0;
}


//
//  main.cpp
//  temp1
//
//  Created by sara nova on 2017/12/8.
//  Copyright © 2017年 sara nova. All rights reserved.
//

#include <iostream>
#include <queue>
#include <cstring>
using namespace std;

struct Node
{
    int a;
    int b;
};

Node list[120];
int tot=1;
queue<int> book;
int vis[120];
bool bfs(int a,int b)
{

    book.push(a);
    vis[a]=true;
    while (!book.empty())
    {
        int tt=book.front();
        book.pop();
        vis[tt]=true;
        for(int i=1;i<tot;i++)
        {
            if(( (list[i].a< list[tt].a && list[tt].a<list[i].b )||(list[i].a< list[tt].b && list[tt].b<list[i].b)) && vis[i]==false   )
            {

                if(i==b) return true;

                book.push(i);
            }
        }
    }

    return false;

}

int main()
{
    int times;
    cin>>times;
    int q,a,b;
    memset(vis,false,sizeof(vis));
    while (times--) {
        cin>>q>>a>>b;
        if(q==1)
        {

            list[tot]=(Node){a,b};
            tot++;
        }
        else if(q==2)
        {
            while (!book.empty()) {
                book.pop();
            }
            memset(vis,false,sizeof(vis));
            if(bfs(a, b))
            {
                cout<<"YES"<<endl;
            }
            else
            {
                cout<<"NO"<<endl;
            }
        }
    }
    return 0;
}


#include <iostream>
#include <cstring>
using namespace std;
int num1[101],num2[101];
bool num[101][101];
int v[101];
int k;
bool check(int x,int y)
{
    if((num1[x]>num1[y] && num1[x]<num2[y])||(num2[x]>num1[y] && num2[x]<num2[y])) return true;
    return false;
}
bool find0(int m,int n)
{
    if(m==n) return true;
    for(int i=0;i<k;i++)
    {
        if(!v[i] && num[m][i])
        {
            v[i]=1;
            if(find0(i,n)) return true;
        }
    }
    return false;
}
int main()
{
    int a,m,n,t;
    while(cin>>t)
    {
        memset(num,false,sizeof(num));
        k=0;
        for(int i=0;i<t;i++)
        {
            cin>>a;
            if(a==1)
            {
                cin>>num1[k]>>num2[k];
                for(int j=0;j<k;j++)
                {
                    if(check(k,j)) num[k][j]=true;
                    if(check(j,k)) num[j][k]=true;
                }
                k++;
            }
            else
            {
                cin>>m>>n;
                memset(v,0,sizeof(v));
                v[m]=1;
                if(find0(m,n)) cout<<"YES"<<endl;
                else cout<<"NO"<<endl;
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int MAX=1000;
struct node
{
    long long s,e;
};
node p[MAX];
int flag[MAX];
int n,x;
long long a,b;
int num;
void dfs(long long a)
{
    flag[a]=1;
    for(int i=1;i<=num;i++)
    {
        if(((p[i].s<p[a].s&&p[a].s<p[i].e)||(p[a].e<p[i].e&&p[a].e>p[i].s))&&flag[i]==0)
            dfs(i);
    }
}
int main()
{
    while(scanf("%d",&n)!=-1)
    {
        num=0;
        for(int i=1; i<=n; i++)
        {
            scanf("%d%I64d%I64d",&x,&a,&b);
            if(x==1)
            {
                p[++num].s=a;
                p[num].e=b;
            }
            else
            {
                memset(flag,0,sizeof(flag));
                dfs(a);
                if(flag[b])
                    printf("YES\n");
                    //cout<<"YES"<<endl;
                else
                    printf("NO\n");
                    //cout<<"NO"<<endl;
            }
        }
    }
    return 0;
}


#include <iostream>
#include <cmemory>
using namespace std;
bool vis[101];
int shu[100][2];
int j=1;
bool dfs(int a,int b)
{
    if(a==b)
        return true;

        for(int i=1;i<=j;i++)
        {
             if((shu[a][0]>shu[i][0]&&shu[a][0]<shu[i][1])||(shu[a][1]>shu[i][0]&&shu[a][1]<shu[i][1]) && !vis[i])
        {
            vis[i]=true;
            if(dfs(i, b))
                return true;
        }

    }return false;
}

int main()
{int n=100;
    cin>>n;
 memset(shu,0,sizeof(int));
    while(n)
    {
        n--;

        int q,a,b;
            cin>>q>>a>>b;
            if(q==1)
            {
                shu[j][0]=a;
                shu[j][1]=b;
                j++;
            }
            else if(q==2)
            {
                 for(int i=1;i<j;i++) vis[i]=false;
            vis[a]=true;
            if(dfs(a, b)) printf("YES\n");
            else printf("NO\n");
            }

    }
    return 0;
}


#include<iostream>
#include<string>
using namespace std;
int subset(long long  a[][2],int x, int y)
{
	if(a[y][0] < a[x][0] && a[x][0] < a[y][1])
		return 1;
	if(a[y][0] < a[x][1] && a[x][1] < a[y][1])
		return 1;
	return 0;
}
int main()
{
	long long  a[101][2];
	int res[101][101];
	for(int i =0;i<101;i++)
		for(int j =0;j<101;j++)
			res[i][j] = 0;
	int count = 1;
	int t;
	cin>>t;
	int inp;
	while(t--)
	{
		cin>>inp;
		if(inp == 1)
		{
			cin>>a[count][0]>>a[count][1];
			for(int i =1;i<=count;i++)
			{
					if(subset(a,i,count))
					{
						res[i][count] =1;
						//cout<<"a"<<endl;
						for(int z = 1;z<count;z++)
							if(res[z][i] ==1)
								res[z][count] = 1;//,cout<<z<<" "<<count<<endl;
					}
				    if(subset(a,count,i))
					{
						res[count][i] = 1;//cout<<"h"<<endl;
						for(int z = 1;z<count;z++)
							if(res[z][count] ==1)
								{
									res[z][i] = 1;//cout<<z<<" "<<i<<endl;
								}
					}
			}
		count++;
		}
		else
		{
			int a,b;
			cin>>a>>b;
			if(res[a][b]||res[b][a])
				cout<<"YES"<<endl;
			else
				cout<<"NO\n";
		}
	}
	return 0;
}


//package educational8;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class C {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String line = br.readLine();
		String parts [] = line.split(" ");
		int n = Integer.parseInt(parts[0]);
		int k = Integer.parseInt(parts[1]);

		String niceString = br.readLine();

		StringBuilder sb = new StringBuilder();
		for (int i=0;i<n;i++){

			char tek = niceString.charAt(i);
			if (k<=0){
				sb.append(tek);
			}else{
				int aDist = tek-'a';
				int zDist = 'z'-tek;
				if (aDist<k && zDist<k){
					if (aDist>zDist){
						sb.append('a');
						k-=aDist;
					}else{
						sb.append('z');
						k-=zDist;
					}
				}else if (aDist>=k){
					int toAdd = tek-k;
					sb.append(((char)(toAdd)));
					k=0;
				}else if (zDist>=k){
					int toAdd = tek+k;
					sb.append(((char)(toAdd)));
					k=0;
				}
			}
		}
		//System.out.println(sb.toString());
		if (k!=0){
			System.out.println(-1);
		}
		else{
			PrintWriter pw = new PrintWriter(System.out);
			pw.println(sb.toString());
			pw.flush();
			pw.close();
		}
	}
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

public class C {

	static class MyChar{
		char ch;
		int ind;

		public MyChar(int ind, char ch) {
			this.ch = ch;
			this.ind = ind;
		}

		public int getMaxDist() {

			return Math.max((int)(ch - 'a'), (int)('z' - ch));
		}

		public char getNextChar(int dist) {

			char ch1 = (char)(this.ch + dist);
			char ch2 = (char)(this.ch - dist);

			if('a' <= ch1 && ch1 <= 'z') return ch1;

			return ch2;

		}
	}

	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tokenizer = new StringTokenizer(br.readLine());

		int N = Integer.parseInt(tokenizer.nextToken());
		int K = Integer.parseInt(tokenizer.nextToken());

		String s = br.readLine();

		MyChar [] chars = new MyChar[N];

		int totalDistAchieved = 0;

		for(int i=0; i<s.length(); i++) {
			chars[i] = (new MyChar(i, s.charAt(i)));

		}

		Arrays.sort(chars, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				if(o1.getMaxDist() < o2.getMaxDist()) return 1;

				return -1;

			}

		});

		int currDist = 0;

		MyChar [] solChar = new MyChar[N];

		boolean isOver = (K == 0);
		for(int i=0; i<N; i++) {

			MyChar currChar = chars[i];
			if(isOver) {
				solChar[i] = new MyChar(currChar.ind, currChar.ch);
			} else {
				char ch;
				if(currDist + currChar.getMaxDist() < K) {
					ch = currChar.getNextChar(currChar.getMaxDist());
					currDist += currChar.getMaxDist();
				} else {
					ch = currChar.getNextChar(K - currDist);
					isOver = true;
				}

				solChar[i] = new MyChar(currChar.ind, ch);
			}
		}

		if(!isOver) {
			System.out.println(-1);
			return;
		}

		Arrays.sort(solChar, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				// TODO Auto-generated method stub
				if(o1.ind < o2.ind) return -1;

				return 1;
			}

		});

		for(MyChar ch : solChar) {
			System.out.print(String.format("%c", ch.ch));
		}
		System.out.println();
		//bw.newLine();

		//bw.flush();
		//bw.close();
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

public class C {

	static class MyChar{
		char ch;
		int ind;

		public MyChar(int ind, char ch) {
			this.ch = ch;
			this.ind = ind;
		}

		public int getMaxDist() {

			return Math.max((int)(ch - 'a'), (int)('z' - ch));
		}

		public char getNextChar(int dist) {

			char ch1 = (char)(this.ch + dist);
			char ch2 = (char)(this.ch - dist);

			if('a' <= ch1 && ch1 <= 'z') return ch1;

			return ch2;

		}
	}

	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tokenizer = new StringTokenizer(br.readLine());

		int N = Integer.parseInt(tokenizer.nextToken());
		int K = Integer.parseInt(tokenizer.nextToken());

		String s = br.readLine();

		MyChar [] chars = new MyChar[N];

		int totalDistAchieved = 0;

		for(int i=0; i<s.length(); i++) {
			chars[i] = (new MyChar(i, s.charAt(i)));

			totalDistAchieved += chars[i].getMaxDist();

		}

		if(totalDistAchieved < K) {
			System.out.println(-1);
			return;
		}

		Arrays.sort(chars, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				if(o1.getMaxDist() < o2.getMaxDist()) return 1;

				return -1;

			}

		});

		MyChar [] solChar = new MyChar[N];

		int currDist = 0;
		for(int i=0; i<N; i++) {

			MyChar currChar = chars[i];
			if(currDist == K) {
				solChar[i] = new MyChar(currChar.ind, currChar.ch);
			} else {
				char ch;
				if(currDist + currChar.getMaxDist() < K) {
					ch = currChar.getNextChar(currChar.getMaxDist());
					currDist += currChar.getMaxDist();
				} else {
					ch = currChar.getNextChar(K - currDist);
					currDist += K - currDist;
				}

				solChar[i] = new MyChar(currChar.ind, ch);
			}
		}

		Arrays.sort(solChar, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				// TODO Auto-generated method stub
				if(o1.ind < o2.ind) return -1;

				return 1;
			}

		});

		for(MyChar ch : solChar) {
			System.out.print(String.format("%c", ch.ch));
		}
		System.out.println();
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.StringTokenizer;

public class C {

	static class MyChar implements Comparable<MyChar>{
		char ch;
		int ind;

		public MyChar(int ind, char ch) {
			this.ch = ch;
			this.ind = ind;
		}

		@Override
		public int compareTo(MyChar other) {
			if(getMaxDist() < other.getMaxDist()) return 1;

			return -1;
		}

		public int getMaxDist() {

			return Math.max(ch - 'a', 'z' - ch);
		}

		public char getNextChar(int dist) {

			char ch1 = (char)(this.ch + dist);
			char ch2 = (char)(this.ch - dist);

			if('a' <= ch1 && ch1 <= 'z') return ch1;

			return ch2;

		}
	}

	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		StringTokenizer tokenizer = new StringTokenizer(br.readLine());

		int N = Integer.parseInt(tokenizer.nextToken());
		int K = Integer.parseInt(tokenizer.nextToken());

		String s = br.readLine();

		MyChar [] chars = new MyChar[N];

		for(int i=0; i<s.length(); i++) {
			chars[i] = (new MyChar(i, s.charAt(i)));
		}

		Arrays.sort(chars);

		int currDist = 0;

		MyChar [] solChar = new MyChar[N];

		boolean isOver = (K == 0);
		for(int i=0; i<N; i++) {

			MyChar currChar = chars[i];
			if(isOver) {
				solChar[i] = new MyChar(currChar.ind, currChar.ch);
			} else {
				char ch;
				if(currDist + currChar.getMaxDist() < K) {
					ch = currChar.getNextChar(currChar.getMaxDist());
					currDist += currChar.getMaxDist();
				} else {
					ch = currChar.getNextChar(K - currDist);
					isOver = true;
				}

				solChar[i] = new MyChar(currChar.ind, ch);
			}
		}

		if(!isOver) {
			System.out.println(-1);
			return;
		}

		Arrays.sort(solChar, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				// TODO Auto-generated method stub
				if(o1.ind < o2.ind) return -1;

				return 1;
			}

		});

		for(MyChar ch : solChar) {
			bw.write(String.format("%c", ch.ch));
		}
		bw.newLine();

		bw.flush();
		bw.close();
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

public class C {

	static class MyChar{
		char ch;
		int ind;

		public MyChar(int ind, char ch) {
			this.ch = ch;
			this.ind = ind;
		}

		public int getMaxDist() {

			return Math.max((int)(ch) - (int)('a'), (int)('z') - (int)(ch));
		}

		public char getNextChar(int dist) {

			char ch1 = (char)(this.ch + dist);
			char ch2 = (char)(this.ch - dist);

			if('a' <= ch1 && ch1 <= 'z') return ch1;

			return ch2;

		}
	}

	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tokenizer = new StringTokenizer(br.readLine());

		int N = Integer.parseInt(tokenizer.nextToken());
		int K = Integer.parseInt(tokenizer.nextToken());

		String s = br.readLine();

		MyChar [] chars = new MyChar[N];

		int totalDistAchieved = 0;

		for(int i=0; i<s.length(); i++) {
			chars[i] = (new MyChar(i, s.charAt(i)));

			totalDistAchieved += chars[i].getMaxDist();

		}

		if(totalDistAchieved < K) {
			System.out.println(-1);
			return;
		}

		Arrays.sort(chars, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				if(o1.getMaxDist() < o2.getMaxDist()) return 1;

				return -1;

			}

		});

		MyChar [] solChar = new MyChar[N];

		int currDist = 0;
		for(int i=0; i<N; i++) {

			MyChar currChar = chars[i];
			if(currDist == K) {
				solChar[i] = new MyChar(currChar.ind, currChar.ch);
			} else {
				char ch;
				if(currDist + currChar.getMaxDist() < K) {
					ch = currChar.getNextChar(currChar.getMaxDist());
					currDist += currChar.getMaxDist();
				} else {
					ch = currChar.getNextChar(K - currDist);
					currDist += K - currDist;
				}

				solChar[i] = new MyChar(currChar.ind, ch);
			}
		}

		Arrays.sort(solChar, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				// TODO Auto-generated method stub
				if(o1.ind < o2.ind) return -1;

				return 1;
			}

		});

		for(MyChar ch : solChar) {
			System.out.print(String.format("%c", ch.ch));
		}
		System.out.println();
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.StringTokenizer;

public class C {

	static class MyChar{
		char ch;
		int ind;

		public MyChar(int ind, char ch) {
			this.ch = ch;
			this.ind = ind;
		}

		public int getMaxDist() {

			return Math.max(ch - 'a', 'z' - ch);
		}

		public char getNextChar(int dist) {

			char ch1 = (char)(this.ch + dist);
			char ch2 = (char)(this.ch - dist);

			if('a' <= ch1 && ch1 <= 'z') return ch1;

			return ch2;

		}
	}

	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		StringTokenizer tokenizer = new StringTokenizer(br.readLine());

		int N = Integer.parseInt(tokenizer.nextToken());
		int K = Integer.parseInt(tokenizer.nextToken());

		String s = br.readLine();

		MyChar [] chars = new MyChar[N];

		for(int i=0; i<s.length(); i++) {
			chars[i] = (new MyChar(i, s.charAt(i)));
		}

		Arrays.sort(chars, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				if(o1.getMaxDist() < o2.getMaxDist()) return 1;

				return -1;

			}

		});

		int currDist = 0;

		MyChar [] solChar = new MyChar[N];

		boolean isOver = (K == 0);
		for(int i=0; i<N; i++) {

			MyChar currChar = chars[i];
			if(isOver) {
				solChar[i] = new MyChar(currChar.ind, currChar.ch);
			} else {
				char ch;
				if(currDist + currChar.getMaxDist() < K) {
					ch = currChar.getNextChar(currChar.getMaxDist());
					currDist += currChar.getMaxDist();
				} else {
					ch = currChar.getNextChar(K - currDist);
					isOver = true;
				}

				solChar[i] = new MyChar(currChar.ind, ch);
			}
		}

		if(!isOver) {
			System.out.println(-1);
			return;
		}

		Arrays.sort(solChar, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				// TODO Auto-generated method stub
				if(o1.ind < o2.ind) return -1;

				return 1;
			}

		});

		for(MyChar ch : solChar) {
			bw.write(String.format("%c", ch.ch));
		}
		bw.newLine();

		bw.flush();
		bw.close();
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

public class C {

	static class MyChar{
		char ch;
		int ind;

		public MyChar(int ind, char ch) {
			this.ch = ch;
			this.ind = ind;
		}

		public int getMaxDist() {

			return Math.max((int)(ch) - (int)('a'), (int)('z') - (int)(ch));
		}

		public char getNextChar(int dist) {

			char ch1 = (char)(this.ch + dist);
			char ch2 = (char)(this.ch - dist);

			if('a' <= ch1 && ch1 <= 'z') return ch1;

			return ch2;

		}
	}

	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer tokenizer = new StringTokenizer(br.readLine());

		int N = Integer.parseInt(tokenizer.nextToken());
		int K = Integer.parseInt(tokenizer.nextToken());

		String s = br.readLine();

		MyChar [] chars = new MyChar[N];

		int totalDistAchieved = 0;

		for(int i=0; i<s.length(); i++) {
			chars[i] = (new MyChar(i, s.charAt(i)));

			totalDistAchieved += chars[i].getMaxDist();

		}

		if(totalDistAchieved < K) {
			System.out.println(-1);
			return;
		}

		Arrays.sort(chars, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				if(o1.getMaxDist() < o2.getMaxDist()) return 1;
				if(o1.getMaxDist() > o2.getMaxDist()) return -1;

				return 0;

			}

		});

		MyChar [] solChar = new MyChar[N];

		int currDist = 0;
		for(int i=0; i<N; i++) {

			MyChar currChar = chars[i];
			if(currDist == K) {
				solChar[i] = new MyChar(currChar.ind, currChar.ch);
			} else {
				char ch;
				if(currDist + currChar.getMaxDist() < K) {
					ch = currChar.getNextChar(currChar.getMaxDist());
					currDist += currChar.getMaxDist();
				} else {
					ch = currChar.getNextChar(K - currDist);
					currDist += K - currDist;
				}

				solChar[i] = new MyChar(currChar.ind, ch);
			}
		}

		Arrays.sort(solChar, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				// TODO Auto-generated method stub
				if(o1.ind < o2.ind) return -1;

				return 1;
			}

		});

		for(MyChar ch : solChar) {
			System.out.print(String.format("%c", ch.ch));
		}
		System.out.println();
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

public class C {

	static class MyChar{
		char ch;
		int ind;

		public MyChar(int ind, char ch) {
			this.ch = ch;
			this.ind = ind;
		}

		public int getMaxDist() {

			return Math.max(ch - 'a', 'z' - ch);
		}

		public char getNextChar(int dist) {

			char ch1 = (char)(this.ch + dist);
			char ch2 = (char)(this.ch - dist);

			if('a' <= ch1 && ch1 <= 'z') return ch1;

			return ch2;

		}
	}

	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		StringTokenizer tokenizer = new StringTokenizer(br.readLine());

		int N = Integer.parseInt(tokenizer.nextToken());
		int K = Integer.parseInt(tokenizer.nextToken());

		String s = br.readLine();

		MyChar [] chars = new MyChar[N];

		for(int i=0; i<s.length(); i++) {
			chars[i] = (new MyChar(i, s.charAt(i)));
		}

		Arrays.sort(chars, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				if(o1.getMaxDist() < o2.getMaxDist()) return 1;

				return -1;

			}

		});

		int currDist = 0;

		MyChar [] solChar = new MyChar[N];

		boolean isOver = (K == 0);
		for(int i=0; i<N; i++) {

			MyChar currChar = chars[i];
			if(isOver) {
				solChar[i] = new MyChar(currChar.ind, currChar.ch);
			} else {
				char ch;
				if(currDist + currChar.getMaxDist() < K) {
					ch = currChar.getNextChar(currChar.getMaxDist());
					currDist += currChar.getMaxDist();
				} else {
					ch = currChar.getNextChar(K - currDist);
					isOver = true;
				}

				solChar[i] = new MyChar(currChar.ind, ch);
			}
		}

		if(!isOver) {
			System.out.println(-1);
			return;
		}

		Arrays.sort(solChar, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				// TODO Auto-generated method stub
				if(o1.ind < o2.ind) return -1;

				return 1;
			}

		});

		for(MyChar ch : solChar) {
			System.out.print(String.format("%c", ch.ch));
		}
		System.out.println();
		//bw.newLine();

		//bw.flush();
		//bw.close();
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.StringTokenizer;

public class C {

	static class MyChar implements Comparable<MyChar>{
		char ch;
		int ind;

		public MyChar(int ind, char ch) {
			this.ch = ch;
			this.ind = ind;
		}

		@Override
		public int compareTo(MyChar other) {
			if(getMaxDist() < other.getMaxDist()) return 1;

			return -1;
		}

		public int getMaxDist() {

			return Math.max(ch - 'a', 'z' - ch);
		}

		public char getNextChar(int dist) {

			char ch1 = (char)(this.ch + dist);
			char ch2 = (char)(this.ch - dist);

			if('a' <= ch1 && ch1 <= 'z') return ch1;

			return ch2;

		}
	}

	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		StringTokenizer tokenizer = new StringTokenizer(br.readLine());

		int N = Integer.parseInt(tokenizer.nextToken());
		int K = Integer.parseInt(tokenizer.nextToken());

		String s = br.readLine();

		MyChar [] chars = new MyChar[N];

		for(int i=0; i<s.length(); i++) {
			chars[i] = (new MyChar(i, s.charAt(i)));
		}

		Arrays.sort(chars);

		int currDist = 0;

		MyChar [] solChar = new MyChar[N];

		boolean isOver = (K == 0);
		for(int i=0; i<N; i++) {

			MyChar currChar = chars[i];
			if(isOver) {
				solChar[i] = currChar;
			} else {
				char ch;
				if(currDist + currChar.getMaxDist() < K) {
					ch = currChar.getNextChar(currChar.getMaxDist());
					currDist += currChar.getMaxDist();
				} else {
					ch = currChar.getNextChar(K - currDist);
					isOver = true;
				}

				solChar[i] = new MyChar(currChar.ind, ch);
			}
		}

		if(!isOver) {
			System.out.println(-1);
			return;
		}

		Arrays.sort(solChar, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				// TODO Auto-generated method stub
				if(o1.ind < o2.ind) return -1;

				return 1;
			}

		});

		for(MyChar ch : solChar) {
			bw.write(String.format("%c", ch.ch));
		}
		bw.newLine();

		bw.flush();
		bw.close();
	}

}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.StringTokenizer;

public class C {

	static class MyChar implements Comparable<MyChar>{
		char ch;
		int ind;

		public MyChar(int ind, char ch) {
			this.ch = ch;
			this.ind = ind;
		}

		@Override
		public int compareTo(MyChar other) {
			if(getMaxDist() < other.getMaxDist()) return 1;

			return -1;
		}

		public int getMaxDist() {

			return Math.max(ch - 'a', 'z' - ch);
		}

		public char getNextChar(int dist) {

			char ch1 = (char)(this.ch + dist);
			char ch2 = (char)(this.ch - dist);

			if('a' <= ch1 && ch1 <= 'z') return ch1;

			return ch2;

		}
	}

	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		StringTokenizer tokenizer = new StringTokenizer(br.readLine());

		int N = Integer.parseInt(tokenizer.nextToken());
		int K = Integer.parseInt(tokenizer.nextToken());

		String s = br.readLine();

		List<MyChar> chars = new ArrayList<MyChar>();

		for(int i=0; i<s.length(); i++) {
			chars.add(new MyChar(i, s.charAt(i)));
		}

		Collections.sort(chars);

		int currDist = 0;

		List<MyChar> solChar = new ArrayList<MyChar>();

		boolean isOver = (K == 0);
		for(int i=0; i<N; i++) {

			MyChar currChar = chars.get(i);
			if(isOver) {
				solChar.add(new MyChar(currChar.ind, currChar.ch));
			} else {
				char ch;
				if(currDist + currChar.getMaxDist() < K) {
					ch = currChar.getNextChar(currChar.getMaxDist());
					currDist += currChar.getMaxDist();
				} else {
					ch = currChar.getNextChar(K - currDist);
					isOver = true;
				}

				solChar.add(new MyChar(currChar.ind, ch));
			}
		}

		if(!isOver) {
			System.out.println(-1);
			return;
		}

		Collections.sort(solChar, new Comparator<MyChar>(){

			@Override
			public int compare(MyChar o1, MyChar o2) {
				// TODO Auto-generated method stub
				if(o1.ind < o2.ind) return -1;

				return 1;
			}

		});

		StringBuilder toPrint = new StringBuilder();

		for(MyChar ch : solChar) {
			toPrint.append(ch.ch);
		}

		bw.write(String.format("%s\n", toPrint.toString()));

		bw.flush();
		bw.close();
	}

}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class bearandstringdistance {

    public static void main(String[] args) throws Exception {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter w = new PrintWriter(System.out);

        String[] inputs = r.readLine().split(" ");
        int n = Integer.parseInt(inputs[0]);
        int k = Integer.parseInt(inputs[1]);

        char[] temp = r.readLine().toCharArray();

        int[] values = new int[temp.length];
        boolean[] goLeft = new boolean[values.length];
        for (int i = 0; i < values.length; i++) {
            values[i] = temp[i] - 'a';
        }

        //check if we can reach k

        int maxK = 0;
        for (int i = 0; i < values.length; i++) {
            maxK += Math.max(values[i], 25 - values[i]);
            if (values[i] >= 25 - values[i]) {
                goLeft[i] = true;
            }
        }

        if (k > maxK) {
            w.println(-1);
            w.close();
            return;
        }

        for (int i = 0; i < values.length; i++) {
            if (k > 0) {
                if (goLeft[i]) {
                    //go left the full way
                    if (k >= values[i]) {
                        k -= values[i];
                        values[i] = 0;
                    } else {
                        values[i] -= k;
                        k = 0;
                    }
                } else {
                    //go right the full way
                    if (k >= 25 - values[i]) {
                        k -= 25 - values[i];
                        values[i] = 25;
                    } else {
                        values[i] += k;
                        k = 0;
                    }
                }
            } else {
                break;
            }
        }

        for (int i = 0; i < values.length; i++) {
            temp[i] = (char) (values[i] + 'a');
            w.print(temp[i]);
        }

        w.println();w.close();
    }

}


#include<bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
    int n,k;
    cin >> n >> k;

    char str[n];
    scanf("%s",str);
    if(k>n*13)
    {
        printf("-1");
        return 0;
    }
    int i;

    for(i=0;i<n;i++)
    {
        if(k!=0)
        {
            int d = str[i]-97;
            if(k>=13)
            {
                d = d+13;
                d = d%26;
                str[i]=(d+97);
                k=k-13;
            }
            else
            {
                d=d+k;
                d=d%26;
                str[i]=d+97;
                k=0;
            }
        }
        if(!k)break;
    }

    puts(str);

}


#include<bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
   // freopen("out.txt","r",stdin);

    int n,k;
    cin >> n >> k;

    string str;
    cin >> str;
    int i;

    for(i=0;i<n;i++)
    {
        int d = str[i]-97;
        int dif = 25-d;
        if(k>=dif)
        {
            d = d + dif;
            str[i]=d+97;
            k = k -dif;
        }
        else
        {
            d = d + k;
            str[i]=d+97;
            k = 0;
        }
    }
    if(k!=0)printf("-1");
    else cout << str << "\n";

}


#include<bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
   // freopen("out.txt","r",stdin);

    int n,k;
    cin >> n >> k;

    string str;
    cin >> str;
    int i,len=str.length();

    for(i=0;i<len;i++)
    {
        int d = str[i]-97;
        int dif = 25-d;
        if(k>=dif)
        {
            str[i]='z';
            k = k -dif;
        }
        else
        {
            d = d + k;
            str[i]=d+97;
            k = 0;
        }
    }
    if(k!=0)printf("-1");
    else cout << str << "\n";

}


#include<bits/stdc++.h>

using namespace std;
int n,x;
string a,b;
int main()
{
    cin >> n >> x;

    cin >> a;
    int i,len=a.length();
    int counter=0;
    for(i=0;i<len;i++)
    {
        int x1 = 'z'-a[i];
        int x2 = a[i]-'a';
        counter += max(x1,x2);
    }
    if(counter<x)
    {
        printf("-1");
        return 0;
    }
    for(i=0;i<len;i++)
    {
        int dis = 'z'-a[i];
        int fis = a[i]-'a';
        if(dis>fis)
        {

            if(x>=dis)
            {
                x = x - dis;
                a[i]='z';
            }
            else
            {
                a[i]+=x;
                x=0;
            }
        }
        else
        {
            if(x>=fis)
            {
                x = x - fis;
                a[i]='a';
            }
            else
            {
                a[i]-=x;
                x=0;
            }

        }
    }
    cout << a;
    return 0;
}


#include<bits/stdc++.h>

using namespace std;
int n,x;
string a,b;
int main()
{
    cin >> n >> x;

    cin >> a;
    int i,len=a.length();
    int counter=0;
    for(i=0;i<len;i++)
    {
        counter += 'z' - a[i];
    }
    if(counter<x)
    {
        printf("-1");
        return 0;
    }
    for(i=0;i<len;i++)
    {
        int dis = 'z'-a[i];
        if(x>=dis)
        {
            x = x - dis;
            a[i]='z';
        }
        else
        {
            a[i]+=x;
            x=0;
        }
    }
    cout << a;
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
    int n,k;
    cin >> n >> k;

    if(k>n*13)
    {
        printf("-1");
        return 0;
    }

    char str[100005];
    scanf("%s",str);
    char s[100005];
    int i,len=strlen(str);

    for(i=0;i<len;i++)
    {
        if(k!=0)
        {
            int d = str[i]-97;
            if(k>=13)
            {
                d = d+13;
                d = d%26;
                s[i]=d+97;
                k=k-13;
            }
            else
            {
                d=d+k;
                d=d%26;
                s[i]=d+97;
                k=0;
            }
        }
        else s[i]=str[i];
    }

    printf("%s",s);

}


#include <iostream>
#include <algorithm>
using namespace std;

inline int toNumber( char i )
{
    return i - 'a';
}

int main()
{
    int n, k;
    string chain;
    cin >> n >> k >> chain;
    int op1, op2, aux;
    for( int i = 0; i < n; i++ )
        if( k > 0 )
        {
            aux = toNumber(chain[i]);
            if( aux > 13 )
            {
                if( k < 13 )
                {
                    chain[i] -= k-1;
                    k = 0;
                    break;
                }
                k -= aux-1;
                chain[i] -= aux;
            }
            else{
                if( k < 13 )
                {
                    chain[i] += k;
                    k = 0;
                    break;
                }
                k -= (25-aux);
                chain[i] += (25-aux);
            }
        }
        else
            break;
    if( k > 0 )
        cout << -1 << endl;
    else
        cout << chain << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

inline int toNumber( char i )
{
    return i - 'a';
}

int main()
{
    int n, k;
    string chain;
    cin >> n >> k >> chain;
    int op1, op2, aux;
    for( int i = 0; i < n; i++ )
        if( k > 0 )
        {
            aux = toNumber(chain[i]);
            if( aux >= 13 )
            {
                if( aux-k > 0 )
                {
                    chain[i] -= k;
                    k = 0;
                    break;
                }
                k -= aux;
                chain[i] -= aux;
            }
            else{
                if( k+aux < 26 )
                {
                    chain[i] += k;
                    k = 0;
                    break;
                }
                k -= (25-aux);
                chain[i] += (25-aux);
            }
        }
        else
            break;
    if( k > 0 )
        cout << -1 << endl;
    else
        cout << chain << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

inline int toNumber( char i )
{
    return i - 'a';
}

int main()
{
    int n, k;
    string chain;
    cin >> n >> k >> chain;
    int op1, op2, aux;
    for( int i = 0; i < n; i++ )
        if( k > 0 )
        {
            aux = toNumber(chain[i]);
            if( aux > 13 )
            {
                if( k < 13 )
                {
                    chain[i] -= k;
                    k = 0;
                    break;
                }
                k -= aux-1;
                chain[i] -= aux;
            }
            else{
                if( k < 13 )
                {
                    chain[i] += k;
                    k = 0;
                    break;
                }
                k -= (25-aux);
                chain[i] += (25-aux);
            }
            cout << k << endl;
        }
        else
            break;
    if( k > 0 )
        cout << -1 << endl;
    else
        cout << chain << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

inline int toNumber( char i )
{
    return i - 'a';
}

int main()
{
    int n, k;
    string chain;
    cin >> n >> k >> chain;
    int op1, op2, aux;
    for( int i = 0; i < n; i++ )
        if( k > 0 )
        {
            aux = toNumber(chain[i]);
            if( aux > 13 )
            {
                if( aux-k > 0 )
                {
                    chain[i] -= k;
                    k = 0;
                    continue;
                }
                k -= aux;
                chain[i] -= aux;
            }
            else{
                if( k+aux < 26 )
                {
                    chain[i] += k;
                    k = 0;
                    continue;
                }
                k -= (25-aux);
                chain[i] += (25-aux);
            }
        }
        else
            break;
    if( k > 0 )
        cout << -1 << endl;
    else
        cout << chain << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

inline int toNumber( char i )
{
    return i - 'a';
}

int main()
{
    int n, k;
    string chain;
    cin >> n >> k >> chain;
    int op1, op2, aux;
    for( int i = 0; i < n; i++ )
        if( k > 0 )
        {
            aux = toNumber(chain[i]);
            if( aux > 13 )
            {
                if( k < 13 )
                {
                    chain[i] -= k;
                    k = 0;
                    continue;
                }
                k -= aux;
                chain[i] -= aux;
            }
            else{
                if( k < 13 )
                {
                    chain[i] += k;
                    k = 0;
                    continue;
                }
                k -= (25-aux);
                chain[i] += (25-aux);
            }
        }
        else
            break;
    if( k > 0 )
        cout << -1 << endl;
    else
        cout << chain << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

inline int toNumber( char i )
{
    return i - 'a';
}

int main()
{
    int n, k;
    string chain;
    cin >> n >> k >> chain;
    int op1, op2, aux;
    for( int i = 0; i < n; i++ )
        if( k > 0 )
        {
            aux = toNumber(chain[i]);
            if( aux > 13 )
            {
                if( k < 13 )
                {
                    chain[i] -= k;
                    k = 0;
                    continue;
                }
                k -= aux-1;
                chain[i] -= aux;
            }
            else{
                if( k < 13 )
                {
                    chain[i] += k;
                    k = 0;
                    continue;
                }
                k -= (25-aux);
                chain[i] += (25-aux);
            }
        }
        else
            break;
    if( k > 0 )
        cout << -1 << endl;
    else
        cout << chain << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

inline int toNumber( char i )
{
    return i - 'a';
}

int main()
{
    int n, k;
    string chain;
    cin >> n >> k >> chain;
    int op1, op2, aux;
    for( int i = 0; i < n; i++ )
        if( k > 0 )
        {
            aux = toNumber(chain[i]);
            if( aux > 13 )
            {
                if( aux-k > 0 )
                {
                    chain[i] -= k;
                    k = 0;
                    continue;
                }
                k -= aux;
                chain[i] -= aux;
            }
            else{
                if( k < 13 )
                {
                    chain[i] += k;
                    k = 0;
                    continue;
                }
                k -= (25-aux);
                chain[i] += (25-aux);
            }
        }
        else
            break;
    if( k > 0 )
        cout << -1 << endl;
    else
        cout << chain << endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

inline int toNumber( char i )
{
    return i - 'a';
}

int main()
{
    int n, k;
    string chain;
    cin >> n >> k >> chain;
    int op1, op2, aux;
    for( int i = 0; i < n; i++ )
        if( k > 0 )
        {
            aux = toNumber(chain[i]);
            if( aux > 13 )
            {
                if( aux-k > 0 )
                {
                    chain[i] -= k;
                    k = 0;
                    continue;
                }
                k -= aux;
                chain[i] -= aux;
            }
            else{
                if( k < 13 )
                {
                    chain[i] += k;
                    k = 0;
                    continue;
                }
                k -= (25-aux);
                chain[i] += (25-aux);
            }
            cout << k << endl;
        }
        else
            break;
    if( k > 0 )
        cout << -1 << endl;
    else
        cout << chain << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

char c[1000000 + 10];
struct s {
    int pos, len, dir;
} arr[1000000 + 10];

bool cmp(s a, s b) {
    return a.len <= b.len;
}

int main() {
    int n, k, mx = 0;
    scanf("%d %d %s", &n, &k, &c);

    for(int i = 0; i < n; i++) {
        int add = 0;
        if(int(c[i] - 'a') < int('z' - c[i])) {
            add = min(int('z' - c[i]), k);
            c[i] = char(c[i] + add);
            k -= add;
            mx += min(int('z' - c[i]), k);
        } else {
            add = min(int(c[i] - 'a'), k);
            c[i] = char(c[i] + add);
            k -= add;
            mx += min(int(c[i] - 'a'), k);
        }
    }
    if(mx < k){
        printf("-1\n");
        return 0;
    }

    printf("%s\n", c);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

char c[1000000 + 10];
struct s {
    int pos, len, dir;
} arr[1000000 + 10];

bool cmp(s a, s b) {
    return a.len <= b.len;
}

int main() {
    int n, k, mx = 0;
    scanf("%d %d %s", &n, &k, &c);
    for(int i = 0; i < n; i++) {
        arr[i].pos = i;
        if(int(c[i] - 'a') < int('z' - c[i])) {
            arr[i].len = int('z' - c[i]);
            arr[i].dir = 1;
            mx += int('z' - c[i]);
        } else {
            arr[i].len = int(c[i] - 'a');
            arr[i].dir = 0;
            mx += (c[i] - 'a');
        }
    }
    if(mx < k){
        printf("-1\n");
        return 0;
    }
    sort(arr, arr + n, cmp);
    for(int i = 0; i < n; i++){
        if(k == 0)  break;
        int add = min(k, arr[i].len);
        k -= add;
        if(arr[i].dir){
            c[arr[i].pos] += add;
        }
        else{
            c[arr[i].pos] -= add;
        }

    }
    printf("%s\n", c);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

char c[1000000 + 10];
struct s {
    int pos, len, dir;
} arr[1000000 + 10];

bool cmp(s a, s b) {
    return a.len <= b.len;
}

int main() {
    int n, k, mx = 0;
    scanf("%d %d %s", &n, &k, &c);

    for(int i = 0; i < n; i++) {
        int add = 0;
        if(int(c[i] - 'a') < int('z' - c[i])) {
            add = min(int('z' - c[i]), k);
            c[i] = char(c[i] + add);
            k -= add;
            mx += min(int('z' - c[i]), k);
        } else {
            add = min(int(c[i] - 'a'), k);
            c[i] = char(c[i] - add);
            k -= add;
            mx += min(int(c[i] - 'a'), k);
        }
    }
    if(mx < k){
        printf("-1\n");
        return 0;
    }

    printf("%s\n", c);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

char c[1000000 + 10];
struct s {
    int pos, len, dir;
    char ch;
} arr[1000000 + 10];

bool cmp(s a, s b) {
    return a.len <= b.len;
}

int main() {
    int n, k, mx = 0;
    scanf("%d %d %s", &n, &k, &c);
    for(int i = 0; i < n; i++) {
        arr[i].pos = i;
        if(int(c[i] - 'a') < int('z' - c[i])) {
            arr[i].len = int('z' - c[i]);
            arr[i].dir = 1;
            arr[i].ch = c[i];
            mx += int('z' - c[i]);
        } else {
            arr[i].len = int(c[i] - 'a');
            arr[i].dir = 0;
            arr[i].ch = c[i];
            mx += (c[i] - 'a');
        }
    }
    if(mx < k){
        printf("-1\n");
        return 0;
    }
    sort(arr, arr + n, cmp);
    for(int i = 0; i < n; i++){
        int add = min(k, arr[i].len);
        k -= add;

        if(arr[i].dir){
            c[arr[i].pos] += add;
        }
        else{
            c[arr[i].pos] -= add;
        }

    }
    printf("%s\n", c);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

char c[1000000 + 10];
struct s {
    int pos, len, dir;
} arr[1000000 + 10];

bool cmp(s a, s b) {
    return a.len <= b.len;
}

int main() {
    int n, k, mx = 0;
    scanf("%d %d %s", &n, &k, &c);
    for(int i = 0; i < n; i++) {
        int add = 0;
        if(int(c[i] - 'a') < int('z' - c[i])) {
            add = min(int('z' - c[i]), k);
            c[i] = char(c[i] + add);
            k -= add;
            mx += int('z' - c[i]);
        } else {
            add = min(int(c[i] - 'a'), k);
            c[i] = char(c[i] + add);
            k -= add;
            mx += int(c[i] - 'a');
        }
    }
    if(mx < k){
        printf("-1\n");
        return 0;
    }

    printf("%s\n", c);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

char c[1000000 + 10];
struct s {
    int pos, len, dir;
} arr[1000000 + 10];

bool cmp(s a, s b) {
    return a.len <= b.len;
}

int main() {
    int n, k, mx = 0;
    scanf("%d %d %s", &n, &k, &c);

    for(int i = 0; i < n; i++) {
        int add = 0;
        if(int(c[i] - 'a') < int('z' - c[i])) {
            add = min(int('z' - c[i]), k);
            c[i] = char(c[i] + add);
            k -= add;
            mx += min(int('z' - c[i]), k);
        } else {
            add = min(int(c[i] - 'a'), k);
            c[i] = char(c[i] - add);
            k -= add;
            mx += min(int(c[i] - 'a'), k);
        }
    }
    if(k){
        printf("-1\n");
        return 0;
    }

    printf("%s\n", c);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

char c[1000000 + 10];
struct s {
    int pos, len, dir;
} arr[1000000 + 10];

bool cmp(s a, s b) {
    return a.len <= b.len;
}

int main() {
    int n, k, mx = 0;
    scanf("%d %d %s", &n, &k, &c);
    for(int i = 0; i < n; i++) {
        arr[i].pos = i;
        if(int(c[i] - 'a') < int('z' - c[i])) {
            arr[i].len = int('z' - c[i]);
            arr[i].dir = 1;
            mx += int('z' - c[i]);
        } else {
            arr[i].len = int(c[i] - 'a');
            arr[i].dir = 0;
            mx += (c[i] - 'a');
        }
    }
    if(mx < k){
        printf("-1\n");
        return 0;
    }
    sort(arr, arr + n, cmp);
    for(int i = 0; i < n; i++){
        int add = min(k, arr[i].len);
        k -= add;
        if(k == 0)  break;

        if(arr[i].dir){
            c[arr[i].pos] += add;
        }
        else{
            c[arr[i].pos] -= add;
        }

    }
    printf("%s\n", c);

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

char c[100000 + 10];
struct s {
    int pos, len, dir;
    char ch;
} arr[100000 + 10];

bool cmp(s a, s b) {
    return a.len <= b.len;
}

int main() {
    int n, k, mx = 0;
    scanf("%d %d %s", &n, &k, &c);
    for(int i = 0; i < n; i++) {
        arr[i].pos = i;
        if(int(c[i] - 'a') < int('z' - c[i])) {
            arr[i].len = int('z' - c[i]);
            arr[i].dir = 1;
            arr[i].ch = c[i];
            mx += int('z' - c[i]);
        } else {
            arr[i].len = int(c[i] - 'a');
            arr[i].dir = 0;
            arr[i].ch = c[i];
            mx += (c[i] - 'a');
        }
    }
    if(mx < k){
        printf("-1\n");
        return 0;
    }
    sort(arr, arr + n, cmp);
    for(int i = 0; i < n; i++){
        int add = min(k, arr[i].len);
        k -= add;
        if(arr[i].dir){
            c[arr[i].pos] += add;
        }
        else{
            c[arr[i].pos] -= add;
        }

    }
    printf("%s\n", c);

    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
using namespace std;

int main()
{
	long n, k; cin >> n >> k;
	string s; cin >> s;
	string result;
	for (int i = 0; i < n; i++)
	{
		int increase = 'z' - s[i];
		int decrease = s[i] - 'a';
		if (increase > decrease)
		{
			if (increase < k)
			{
				result = result + char(s[i] + increase);
				k -= increase;
			}
			else
			{
				result = result + char(s[i] + k);
				k = 0;
			}
		}
		else
		{
			if (decrease < k)
			{
				result = result + char(s[i] - decrease);
				k -= decrease;
			}
			else
			{
				result = result + char(s[i] - k);
				k = 0;
			}
		}
	}
	if (k != 0)
		cout << -1 << endl;
	else
		printf("%s", result.cstr_());
}


#include<iostream>
#include<string>
using namespace std;

int main()
{
	long n, k; cin >> n >> k;
	string s; cin >> s;
	string result;
	for (int i = 0; i < n; i++)
	{
		int increase = 'z' - s[i];
		int decrease = s[i] - 'a';
		if (increase > decrease)
		{
			if (increase < k)
			{
				result = result + char(s[i] + increase);
				k -= increase;
			}
			else
			{
				result = result + char(s[i] + k);
				k = 0;
			}
		}
		else
		{
			if (decrease < k)
			{
				result = result + char(s[i] - decrease);
				k -= decrease;
			}
			else
			{
				result = result + char(s[i] - k);
				k = 0;
			}
		}
	}
	if (k != 0)
		cout << -1 << endl;
	else
		cout << result << endl;
}


#include<iostream>
#include<string>
#include<cstdio>
using namespace std;

char result[100004];
int main()
{
	long n, k; cin >> n >> k;
	string s; cin >> s;
	for (int i = 0; i < n; i++)
	{
		int increase = 'z' - s[i];
		int decrease = s[i] - 'a';
		if (increase > decrease)
		{
			if (increase < k)
			{
				result[i] = char(s[i] + increase);
				k -= increase;
			}
			else
			{
				result[i] = char(s[i] + k);
				k = 0;
			}
		}
		else
		{
			if (decrease < k)
			{
				result[i] = char(s[i] - decrease);
				k -= decrease;
			}
			else
			{
				result[i] = char(s[i] - k);
				k = 0;
			}
		}
	}
	if (k != 0)
		cout << -1 << endl;
	else
	{
		printf("%s\n", result);
	}
}


#include<iostream>
#include<string>
#include<cstdio>
using namespace std;

int main()
{
	long n, k; cin >> n >> k;
	string s; cin >> s;
	string result;
	for (int i = 0; i < n; i++)
	{
		int increase = 'z' - s[i];
		int decrease = s[i] - 'a';
		if (increase > decrease)
		{
			if (increase < k)
			{
				result = result + char(s[i] + increase);
				k -= increase;
			}
			else
			{
				result = result + char(s[i] + k);
				k = 0;
			}
		}
		else
		{
			if (decrease < k)
			{
				result = result + char(s[i] - decrease);
				k -= decrease;
			}
			else
			{
				result = result + char(s[i] - k);
				k = 0;
			}
		}
	}
	if (k != 0)
		cout << -1 << endl;
	else
	{
		const char* r = result.c_str();
		printf("%s", r);
	}
}


#include<iostream>
#include<string>
#include<cstdio>
using namespace std;

int main()
{
	long n, k; cin >> n >> k;
	string s; cin >> s;
	string result;
	for (int i = 0; i < n; i++)
	{
		int increase = 'z' - s[i];
		int decrease = s[i] - 'a';
		if (increase > decrease)
		{
			if (increase < k)
			{
				result = result + char(s[i] + increase);
				k -= increase;
			}
			else
			{
				result = result + char(s[i] + k);
				k = 0;
			}
		}
		else
		{
			if (decrease < k)
			{
				result = result + char(s[i] - decrease);
				k -= decrease;
			}
			else
			{
				result = result + char(s[i] - k);
				k = 0;
			}
		}
	}
	if (k != 0)
		cout << -1 << endl;
	else
		printf("%s", result.c_str());
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
string s;
string a;

bool search(long long len, long long val )
{
	if (len == n && val == dist)
		return 1;

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  cin >> s;
  long long  i = 0, val = 0;

   //cout << val << endl;
   if (dist > 25 * n)
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;

   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a += 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a += 'z';
      	dist -= abs('z' - s[i]);
      	//cout << dist << endl;
      }

      i++;
   }

   i--;
   a.pop_back();
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }

   if (search(i,0))
   	cout << a << endl;
   //else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
string s;
string a;

bool search(long long len, long long val )
{
	if (len == n && val == dist)
		return 1;

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  cin >> s;
  long long  i = 0, val = 0;

  for(i = 0; i < s.length(); i++)
  	val += s[i];

   if (val > 'z' * s.length() || val < 'a' * s.length() )
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;
   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a += 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a += 'z';
      	dist -= abs('z' - s[i]);
      	//cout << dist << endl;
      }

      i++;
   }

   i--;
   a.pop_back();
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }

   if (search(i,0))
   	cout << a << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
char a[100001];
char s[100001];

bool search(long long len, long long val )
{
	if (len == n && val == dist){
		//cout << len <<endl;
		return 1;
	}

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a[len] = i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  scanf("%s", s);
  long long  i = 0, val = 0;

   //cout << val << endl;
   if (dist > 25 * n)
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;

   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a[i] = 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a[i] = 'z';
      	dist -= abs('z' - s[i]);

      }

      i++;
   }

   i--;
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }
   //cout << n << endl;

   if (search(i,0)){
   	a[n] = '\0';
   	printf("%s\n", a);
   }
   else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
string s;
char a[100001];
char s[100001];

bool search(long long len, long long val )
{
	if (len == n && val == dist)
		return 1;

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a[len] = i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  scanf("%s", s);
  long long  i = 0, val = 0;

   //cout << val << endl;
  cout << dist <<endl << 25 *n;
   if (dist > 25 * n)
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;

   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a[i] = 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a[i] = 'z';
      	dist -= abs('z' - s[i]);
      	//cout << dist << endl;
      }

      i++;
   }

   i--;
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }

   a[n] = '\0';
   if (search(i,0))
   	printf("%s\n", a);

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
char a[100001];
char s[100001];

bool search(long long len, long long val )
{
	if (len == n && val == dist)
		return 1;

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a[len] = i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  scanf("%s", s);
  long long  i = 0, val = 0;

   //cout << val << endl;
  cout << dist <<endl << 25 *n;
   if (dist > 25 * n)
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;

   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a[i] = 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a[i] = 'z';
      	dist -= abs('z' - s[i]);
      	//cout << dist << endl;
      }

      i++;
   }

   i--;
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }

   a[n] = '\0';
   if (search(i,0))
   	printf("%s\n", a);

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
string s;
string a;

bool search(long long len, long long val )
{
	if (len == n && val == dist)
		return 1;

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  cin >> s;
  long long  i = 0, val = 0;

  for(i = 0; i < s.length(); i++)
  	val += s[i]-('a'-1);

   //cout << val << endl;
   if (val > ('z' -'a'+1)* s.length() || val < s.length() || dist > 25 * s.length())
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;

   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a += 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a += 'z';
      	dist -= abs('z' - s[i]);
      	//cout << dist << endl;
      }

      i++;
   }

   i--;
   a.pop_back();
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }

   if (search(i,0))
   	cout << a << endl;
   //else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dis, sum[100001]={0},vals[100001]={0};
string s;
string a;

bool search(long long len, long long val)
{
	if (len == n && val == dis)
		return 1;

	if (len > n || val > dis)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(s[len]- a[len]) ))
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dis;
  cin >> s;
  long long val = 0, start = 0, i, m= 0;

  for(i = 0; i < s.length(); i++)
  	val += s[i];

   if (val > 'z' * s.length() || val < 'a' * s.length() )
   {
 	cout << -1<<endl;
   	return 0;
   }

   for(i = 0; i < s.length(); i++ ){
   	if (val > 0 )
   	{
   		val -= 'z';
   		a += 'z';
   	}
   	else {a.pop_back(); val += 'z'; i--; break;}

   }

  if (search(i,val))
  	cout << a << endl;
  else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
string s;
string a;

bool search(long long len, long long val )
{
	if (len == n && val == dist)
		return 1;

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  cin >> s;
  long long  i = 0, val = 0;

  for(i = 0; i < s.length(); i++)
  	val += s[i];

   cout << val << endl;
   if (val > 'z' * s.length() || val < 'a' * s.length() || dist > 25 * s.length())
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;
   long long temp = dist;
   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a += 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a += 'z';
      	dist -= abs('z' - s[i]);
      	//cout << dist << endl;
      }

      i++;
   }

   i--;
   a.pop_back();
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }

   if (search(i,0))
   	cout << a << endl;
   //else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
string s;
string a;

bool search(long long len, long long val )
{
	if (len == n && val == dist)
		return 1;

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  cin >> s;
  long long  i = 0, val = 0;

   //cout << val << endl;
   if (dist > 25 * s.length())
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;

   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a += 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a += 'z';
      	dist -= abs('z' - s[i]);
      	//cout << dist << endl;
      }

      i++;
   }

   i--;
   a.pop_back();
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }

   if (search(i,0))
   	cout << a << endl;
   //else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
string s;
string a;

bool search(long long len, long long val )
{
	if (len == n && val == dist)
		return 1;

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  cin >> s;
  long long  i = 0, val = 0;

  for(i = 0; i < s.length(); i++)
  	val += s[i];

   //cout << val << endl;
   if (val > 'z' * s.length() || val < 'a' * s.length() || dist > 25 * s.length())
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;
   long long temp = dist;
   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a += 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a += 'z';
      	dist -= abs('z' - s[i]);
      	//cout << dist << endl;
      }

      i++;
   }

   i--;
   a.pop_back();
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }

   if (search(i,0))
   	cout << a << endl;
   //else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dis, sum[100001]={0};
string s;
string a;

bool search(long long len, long long val)
{
	if (len == n && val == dis)
		return 1;

	if (len > n || val > dis)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(s[len]- a[len]) ))
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dis;
  cin >> s;
  long long val = 0, start = 0, i;
  sum[s.length()-1] = s[s.length()-1];
  for( i = s.length()-1; i >= 0; i--)
  {
  	val += max(abs(s[i]-'a'),abs(s[i] - 'z')  );
  	if (i < s.length()-1)
  		sum[i] += sum[i+1] + s[i];

  }

  if (dis> n * 25 || val < dis){
  	cout << -1 <<endl;
  	return 0;
}

 while(dis-val > 25 * (n-start))
  {
  	a+='z';

  }

  if (search(0,0))
  	cout << a << endl;
  else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
char a[100001];
char s[100001];

bool search(long long len, long long val )
{
	if (len == n && val == dist){
		//cout << len <<endl;
		return 1;
	}

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a[len] = i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  scanf("%s", s);
  long long  i = 0, val = 0;

   //cout << val << endl;
   if (dist > 25 * n)
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;

   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a[i] = 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a[i] = 'z';
      	dist -= abs('z' - s[i]);

      }

      i++;
   }

   i--;
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }
   //cout << n << endl;

   if (search(i,0)){
   	a[n] = '\0';
   	printf("%s\n", a);
   }

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dis, sum[100001]={0},vals[100001]={0};
string s;
string a;

bool search(long long len, long long val)
{
	if (len == n && val == dis)
		return 1;

	if (len > n || val > dis)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(s[len]- a[len]) ))
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dis;
  cin >> s;
  long long val = 0, start = 0, i;
  sum[s.length()-1] = s[s.length()-1];
  for( i = s.length()-1; i >= 0; i--)
  {
  	val += max(abs(s[i]-'a'),abs(s[i] - 'z')  );
  	vals[i] = val;
  	if (i < s.length()-1)
  		sum[i] += sum[i+1] + s[i];

  }

  if (dis> n * 25 || val < dis){
  	cout << -1 <<endl;
  	return 0;
}

val = 0;
long long temp = sum[0];
for(i = 0; i < s.length(); i++)
{
	if(temp > (s.length()-i)*'b' )
	{

		temp -= 'z';
		a += 'z';
		val += abs(s[i] - 'z');
	}
	else break;
}

  if (search(i,val))
  	cout << a << endl;
  else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dis;
string s;
string a;

bool search(long long len, long long val)
{
	if (len == n && val == dis)
		return 1;

	if (len > n || val > dis)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(s[len]- a[len]) ))
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dis;
  cin >> s;
  if (search(0,0))
  	cout << a << endl;
  else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dis;
string s;
string a;

bool search(long long len, long long val)
{
	if (len == n && val == dis)
		return 1;

	if (len > n || val > dis)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a += i;
		if (search(len+1, val + abs(s[len]- a[len]) ))
			return 1;

		a.pop_back();
	}
	return 0;

}

int main()
{
  cin >> n >> dis;
  cin >> s;

  if (dis > n * 25){
  	cout << -1 <<endl;
  	return 0;
}

  if (search(0,0))
  	cout << a << endl;
  else cout << -1 << endl;

  return 0;
}


#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

using namespace std;
long long n, dist, sum[100001]={0};
char a[100001];
char s[100001];

bool search(long long len, long long val )
{
	if (len == n && val == dist)
		return 1;

	if (len > n || val > dist)
		return 0;

	for(int i = 'a'; i <= 'z'; i++)
	{
		a[len] = i;
		if (search(len+1, val + abs(i-s[len])) )
			return 1;

	}
	return 0;

}

int main()
{
  cin >> n >> dist;
  scanf("%s", s);
  long long  i = 0, val = 0;

   //cout << val << endl;
   if (dist > 25 * n)
   {
 	cout << -1<<endl;
   	return 0;
   }
   i = 0;

   while(dist >= 0)
   {
      if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	a[i] = 'a';
      	dist -= abs('a' - s[i]);
 		}
      else {

      	a[i] = 'z';
      	dist -= abs('z' - s[i]);

      }

      i++;
   }

   i--;
    if (abs('a' - s[i]) > abs('z' - s[i]) )
      {
      	dist += abs('a' - s[i]);
 		}
      else {

      	dist += abs('z' - s[i]);
      }

   a[n] = '\0';
   if (search(i,0))
   	printf("%s\n", a);

  return 0;
}


#include <iostream>
#include <stdio.h>
#include<cstring>
using namespace std;

char s[100005];
char news[100005];
int main()
{
    long long res=0;
    int n,k;
    cin>>n>>k;
    scanf("%s",s);

    for(int i=0;i<strlen(s);i++){
        if (k==0){
            news[i]=s[i];
            continue;
        }
        if(s[i]-'a'<=13){
            if('z'-s[i]<k){
                news[i]='z';
                k-='z'-s[i];
            }else{
                news[i]=(char)(s[i]+k);
                k=0;
            }
        }else{
            if(s[i]-'a'<k){
                news[i]='a';
                k-=s[i]-'a';
            }else{
                news[i]=(char)(s[i]-k);
                k=0;
            }
        }
    }
    if(k!=0){
        cout<<"-1";
    }else{
        for(int i=0;i<strlen(s);i++){
            cout<<news[i];
        }
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<cstring>
using namespace std;

char s[100005];
char news[100005];
int main()
{
    long long res=0;
    int n,k;
    cin>>n>>k;
    scanf("%s",s);

    for(int i=0;i<strlen(s);i++){
        if (k==0){
            news[i]=s[i];
            continue;
        }
        if(s[i]-'a'<=13){
            if('z'-s[i]<k){
                news[i]='z';
                k-='z'-s[i];
            }else{
                news[i]=(char)(s[i]+k);
                k=0;
            }
        }else{
            if(s[i]-'a'<k){
                news[i]='a';
                k-=s[i]-'a';
            }else{
                news[i]=(char)(s[i]-k);
                k=0;
            }
        }
    }
    if(k!=0){
        cout<<"-1";
    }else{
        /*for(int i=0;i<strlen(s);i++){
            printf(news[i];
        }*/
        printf("%s",news);
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<cstring>
using namespace std;

char s[100005];
char news[100005];
int main()
{
    long long res=0;
    int n,k;
    cin>>n>>k;
    scanf("%s",s);

    for(int i=0;i<strlen(s);i++){
        if (k==0){
            news[i]=s[i];
            continue;
        }
        if(s[i]-'a'<=13){
            if('z'-s[i]<k){
                news[i]="z";
                k-='z'-s[i];
            }else{
                news[i]=(char)(s[i]+k);
                k=0;
            }
        }else{
            if(s[i]-'a'<k){
                printf("a");
                k-=s[i]-'a';
            }else{
                news[i]=(char)(s[i]-k);
                k=0;
            }
        }
    }
    if(k!=0){
        cout<<"-1";
    }else{
        for(int i=0;i<strlen(s);i++){
            cout<<news[i];
        }
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<cstring>
using namespace std;

char s[100005];
char news[100005];
int main()
{
    long long res=0;
    int n,k;
    cin>>n>>k;
    scanf("%s",s);

    for(int i=0;i<strlen(s);i++){
        if (k==0){
            news[i]=s[i];
            continue;
        }
        if(s[i]-'a'<=13){
            if('z'-s[i]<k){
                printf("z");
                k-='z'-s[i];
            }else{
                cnews[i]=(char)(s[i]+k);
                k=0;
            }
        }else{
            if(s[i]-'a'<k){
                printf("a");
                k-=s[i]-'a';
            }else{
                news[i]=(char)(s[i]-k);
                k=0;
            }
        }
    }
    if(k!=0){
        cout<<"-1";
    }else{
        for(int i=0;i<strlen(s);i++){
            cout<<news[i];
        }
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<cstring>
using namespace std;

char s[100005];
int s1[100005];
char news[100005];
int main()
{
    long long res=0;
    int n,k;
    cin>>n>>k;
    scanf("%s",s);

    for(int i=0;i<n;i++){
        s1[i] = s[i]-'a';
    }
    for(int i=0;i<n;i++){
        if (k==0){
            news[i]=s[i];
            continue;
        }
        if(s1[i]<=13){
            if('z'-s[i]<k){
                news[i]='z';
                k-='z'-s[i];
            }else{
                news[i]=(char)(s[i]+k);
                k=0;
            }
        }else{
            if(s1[i]<k){
                news[i]='a';
                k-=s1[i];
            }else{
                news[i]=(char)(s[i]-k);
                k=0;
            }
        }
    }
    if(k!=0){
        cout<<"-1";
    }else{
        /*for(int i=0;i<strlen(s);i++){
            printf(news[i];
        }*/
        printf("%s",news);
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<cstring>
using namespace std;

char s[100005];
char news[100005];
int main()
{
    long long res=0;
    int n,k;
    cin>>n>>k;
    scanf("%s",s);

    for(int i=0;i<strlen(s);i++){
        if (k==0){
            news[i]=s[i];
            continue;
        }
        if(s[i]-'a'<=13){
            if('z'-s[i]<k){
                printf("z");
                k-='z'-s[i];
            }else{
                news[i]=(char)(s[i]+k);
                k=0;
            }
        }else{
            if(s[i]-'a'<k){
                printf("a");
                k-=s[i]-'a';
            }else{
                news[i]=(char)(s[i]-k);
                k=0;
            }
        }
    }
    if(k!=0){
        cout<<"-1";
    }else{
        for(int i=0;i<strlen(s);i++){
            cout<<news[i];
        }
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<cstring>
using namespace std;

char s[100005];
//char news[100005];
int main()
{
    long long res=0;
    int n,k;
    cin>>n>>k;
    scanf("%s",s);

    for(int i=0;i<strlen(s);i++){
        if (k==0){
            cout<<s[i];
            continue;
        }
        if(s[i]-'a'<=13){
            if('z'-s[i]<k){
                printf("z");
            }else{
                cout<<(char)(s[i]+k);
                k=0;
            }
        }else{
            if('z'-s[i]<k){
                printf("a");
            }else{
                cout<<(char)(s[i]-k);
                k=0;
            }
        }
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<cstring>
using namespace std;

char s[100005];
//char news[100005];
int main()
{
    long long res=0;
    int n,k;
    cin>>n>>k;
    scanf("%s",s);

    for(int i=0;i<strlen(s);i++){
        if (k==0){
            cout<<s[i];
            continue;
        }
        if(s[i]-'a'<=13){
            if('z'-s[i]<k){
                printf("z");
                k-='z'-s[i];
            }else{
                cout<<(char)(s[i]+k);
                k=0;
            }
        }else{
            if(s[i]-'a'<k){
                printf("a");
                k-=s[i]-'a';
            }else{
                cout<<(char)(s[i]-k);
                k=0;
            }
        }
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<cstring>
using namespace std;

char s[100005];
int s1[100005];
char news[100005];
int main()
{
    long long res=0;
    int n,k;
    cin>>n>>k;
    scanf("%s",s);

    for(int i=0;i<n;i++){
        s1[i] = s[i]-'a';
    }
    for(int i=0;i<n;i++){
        if (k==0){
            news[i]=s[i];
            continue;
        }
        if(s1[i]<=12){
            if('z'-s[i]<k){
                news[i]='z';
                k-='z'-s[i];
            }else{
                news[i]=(char)(s[i]+k);
                k=0;
            }
        }else{
            if(s1[i]<k){
                news[i]='a';
                k-=s1[i];
            }else{
                news[i]=(char)(s[i]-k);
                k=0;
            }
        }
    }
    if(k!=0){
        cout<<"-1";
    }else{
        /*for(int i=0;i<strlen(s);i++){
            printf(news[i];
        }*/
        printf("%s",news);
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,i,j,ans,a,k,m,l,c,p;
char x[1000001];
string s,s1="";
int main(){
    scanf("%d%d",&n,&k);
    scanf("%s",&x);
    s=x;
    if (k>s.size()*25){
        cout<<-1<<endl;
        return 0;
    }
    p=k/n;
    m=k%n;
    for(i=0;i<n;i++){
        if (l<m) {
            l++;
            c=p+1;
        } else c=p;
        if (s[i]+c>='a' && s[i]+c<='z') s1+=s[i]+c; else s1+=s[i]-c;
        //cout<<s1<<endl;
    }
    cout<<s1<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,i,j,ans,a,k,m,l,c,p;
bool error;
char x[1000001];
string s,s1="";
int main(){
    scanf("%d%d",&n,&k);
    scanf("%s",&x);
    s=x;
    if (k>s.size()*25){
        cout<<-1<<endl;
        return 0;
    }
    p=k/n;
    m=k%n;
    for(i=0;i<n;i++){
        if (l<m) {
            l++;
            c=p+1;
        } else c=p;
        if (s[i]+c>='a' && s[i]+c<='z') s1+=s[i]+c; else
        if (s[i]-c>='a' && s[i]-c<='z') s1+=s[i]-c; else {error=1;break;}
        //cout<<s1<<endl;
    }
    if (error==1) cout<<-1<<endl; else cout<<s1<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long n,i,j,ans,a,k,m,l,c,p;
bool error;
char x[1000001];
string s,s1="";
int main(){
    scanf("%d%d",&n,&k);
    scanf("%s",&x);
    s=x;
    if (k>s.size()*25){
        cout<<-1<<endl;
        return 0;
    }
    p=k/n;
    m=k%n;
    for(i=0;i<n;i++){
        if (l<m) {
            l++;
            c=p+1;
        } else c=p;
        if (s[i]+c>='a' && s[i]+c<='z') s1+=s[i]+c; else
        if (s[i]-c>='a' && s[i]-c<='z') s1+=s[i]-c; else
        if (s[i]+c-1>='a' && s[i]+c-1<='z' && l<=m) {s1+=s[i]+c-1;l--;} else
        if (s[i]-c+1>='a' && s[i]-c+1<='z' && l<=m) {s1+=s[i]-c+1;l--;} else {error=1;break;}
        //cout<<s1<<endl;
    }
    if (error==1) cout<<-1<<endl; else cout<<s1<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,last,*fol,all=0;
    char str[100001];
    scanf("%d %d",&n,&last);
    fol=new int[n+1];
    scanf("%s",str);
    for(int i=0;i<strlen(str);i++)
    {
        int temp;
        if(str[i]-'a'>'z'-str[i])
        {
            temp=str[i]-'a';
            fol[i]=-temp;
        }
        else
        {
            temp='z'-str[i];
            fol[i]=temp;
        }
        all+=temp;
        if(all>=last)
            break;
    }
    if(all<last)
        printf("-1\n");
    else
    {
        int i=0;
        while(last>=abs(fol[i]))
        {
            if(fol[i]>0)
                printf("z");
            else
                printf("a");
            last-=abs(fol[i]);
            i++;
        }
        if(i<strlen(str))
        if(str[i]+last<='z')
        printf("%c",str[i]+last);
        else
            printf("%c",str[i]-last);
        i++;
        if(i<strlen(str))
        printf("%s\n",str+i);
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,last,*fol,all=0;
    char str[100001];
    scanf("%d %d",&n,&last);
    fol=new int[n+1];
    scanf("%s",str);
    for(int i=0;i<strlen(str);i++)
    {
        int temp;
        if(str[i]-'a'>'z'-str[i])
        {
            temp=str[i]-'a';
            fol[i]=-temp;
        }
        else
        {
            temp='z'-str[i];
            fol[i]=temp;
        }
        all+=temp;
        if(all>=last)
            break;
    }
    if(all<last)
        printf("-1\n");
    else
    {
        int i=0;
        while(last>=abs(fol[i]))
        {
            if(fol[i]>0)
                printf("z");
            else
                printf("a");
            last-=abs(fol[i]);
            i++;
        }
        if(i<strlen(str));
        if(str[i]+last<='z')
        printf("%c",str[i]+last);
        else
            printf("%c",str[i]-last);
        i++;
        if(i<strlen(str));
        printf("%s\n",str+i);
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,last,*fol,all=0;
    char *str;
    scanf("%d %d",&n,&last);
    str=new char[n+1];
    fol=new int[n+1];
    scanf("%s",str);
    for(int i=0;i<strlen(str);i++)
    {
        int temp;
        if(str[i]-'a'>'z'-str[i])
        {
            temp=str[i]-'a';
            fol[i]=-temp;
        }
        else
        {
            temp='z'-str[i];
            fol[i]=temp;
        }
        all+=temp;
    }
    if(all<last)
        printf("-1\n");
    else
    {
        int i=0;
        while(last>=abs(fol[i]))
        {
            if(fol[i]>0)
                printf("z");
            else
                printf("a");
            last-=abs(fol[i]);
            i++;
        }
        if(str[i]+last<='z')
        printf("%c",str[i]+last);
        else
            printf("%c",str[i]-last);
        i++;
        while(i<strlen(str))
            printf("%c",str[i++]);
        printf("\n");
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,last,*fol,all=0;
    char str[100001];
    scanf("%d %d",&n,&last);
    fol=new int[n+1];
    scanf("%s",str);
    for(int i=0;i<strlen(str);i++)
    {
        int temp;
        if(str[i]-'a'>'z'-str[i])
        {
            temp=str[i]-'a';
            fol[i]=-temp;
        }
        else
        {
            temp='z'-str[i];
            fol[i]=temp;
        }
        all+=temp;
        if(all>=last)
            break;
    }
    if(all<last)
        printf("-1\n");
    else
    {
        int i=0;
        while(i<n&&last>=abs(fol[i]))
        {
            if(fol[i]>0)
                printf("z");
            else
                printf("a");
            last-=abs(fol[i]);
            i++;
        }
        if(i<n)
        if(str[i]+last<='z')
        printf("%c",str[i]+last);
        else
            printf("%c",str[i]-last);
        i++;
        if(i<n)
        printf("%s",str+i);
        printf("\n");
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,last,*fol,all=0;
    char str[100001];
    scanf("%d %d",&n,&last);
    fol=new int[n+1];
    scanf("%s",str);
    for(int i=0;i<strlen(str);i++)
    {
        int temp;
        if(str[i]-'a'>'z'-str[i])
        {
            temp=str[i]-'a';
            fol[i]=-temp;
        }
        else
        {
            temp='z'-str[i];
            fol[i]=temp;
        }
        all+=temp;
        if(all>=last)
            break;
    }
    if(all<last)
        printf("-1\n");
    else
    {
        int i=0;
        while(last>=abs(fol[i]))
        {
            if(fol[i]>0)
                printf("z");
            else
                printf("a");
            last-=abs(fol[i]);
            i++;
        }
        if(i<strlen(str))
        if(str[i]+last<='z')
        printf("%c",str[i]+last);
        else
            printf("%c",str[i]-last);
        i++;
        if(i<strlen(str))
        printf("%s",str+i);
        printf("\n");
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,last,*fol,all=0;
    char str[100001];
    scanf("%d %d",&n,&last);
    fol=new int[n+1];
    scanf("%s",str);
    for(int i=0;i<strlen(str);i++)
    {
        int temp;
        if(str[i]-'a'>'z'-str[i])
        {
            temp=str[i]-'a';
            fol[i]=-temp;
        }
        else
        {
            temp='z'-str[i];
            fol[i]=temp;
        }
        all+=temp;
        if(all>=last)
            break;
    }
    if(all<last)
        printf("-1\n");
    else
    {
        int i=0;
        while(last>=abs(fol[i]))
        {
            if(fol[i]>0)
                printf("z");
            else
                printf("a");
            last-=abs(fol[i]);
            i++;
        }
        if(i<n)
        if(str[i]+last<='z')
        printf("%c",str[i]+last);
        else
            printf("%c",str[i]-last);
        i++;
        if(i<n)
        printf("%s",str+i);
        printf("\n");
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,last,*fol,all=0;
    char *str;
    scanf("%d %d",&n,&last);
    str=new char[n+1];
    fol=new int[n+1];
    scanf("%s",str);
    for(int i=0;i<strlen(str);i++)
    {
        int temp;
        if(str[i]-'a'>'z'-str[i])
        {
            temp=str[i]-'a';
            fol[i]=-temp;
        }
        else
        {
            temp='z'-str[i];
            fol[i]=temp;
        }
        all+=temp;
        if(all>=last)
            break;
    }
    if(all<last)
        printf("-1\n");
    else
    {
        int i=0;
        while(last>=abs(fol[i]))
        {
            if(fol[i]>0)
                printf("z");
            else
                printf("a");
            last-=abs(fol[i]);
            i++;
        }
        if(str[i]+last<='z')
        printf("%c",str[i]+last);
        else
            printf("%c",str[i]-last);
        i++;
        while(i<strlen(str))
            printf("%c",str[i++]);
        printf("\n");
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,last,*fol,all=0;
    char str[100001];
    scanf("%d %d",&n,&last);
    fol=new int[n+1];
    scanf("%s",str);
    for(int i=0;i<strlen(str);i++)
    {
        int temp;
        if(str[i]-'a'>'z'-str[i])
        {
            temp=str[i]-'a';
            fol[i]=-temp;
        }
        else
        {
            temp='z'-str[i];
            fol[i]=temp;
        }
        all+=temp;
        if(all>=last)
            break;
    }
    if(all<last)
        printf("-1\n");
    else
    {
        int i=0;
        while(last>=abs(fol[i]))
        {
            if(fol[i]>0)
                printf("z");
            else
                printf("a");
            last-=abs(fol[i]);
            i++;
        }
        if(str[i]+last<='z')
        printf("%c",str[i]+last);
        else
            printf("%c",str[i]-last);
        i++;
        printf("%s\n",str+i);
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n,last,*fol,all=0;
    char str[10001];
    scanf("%d %d",&n,&last);
    fol=new int[n+1];
    scanf("%s",str);
    for(int i=0;i<strlen(str);i++)
    {
        int temp;
        if(str[i]-'a'>'z'-str[i])
        {
            temp=str[i]-'a';
            fol[i]=-temp;
        }
        else
        {
            temp='z'-str[i];
            fol[i]=temp;
        }
        all+=temp;
        if(all>=last)
            break;
    }
    if(all<last)
        printf("-1\n");
    else
    {
        int i=0;
        while(last>=abs(fol[i]))
        {
            if(fol[i]>0)
                printf("z");
            else
                printf("a");
            last-=abs(fol[i]);
            i++;
        }
        if(str[i]+last<='z')
        printf("%c",str[i]+last);
        else
            printf("%c",str[i]-last);
        i++;
        printf("%s\n",str+i);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define          mp                make_pair
#define          pb                push_back
typedef long long int big;
#define         x                  first
#define         y                  second
#define         forn(i, n)         for(int i = 0;i<n;i++)
#define         nfor(i, n)         for(int i = n-1;i>=0;i--)
typedef pair<int, int>             ii;
const int N = 1000000;
char a[N];
int n,k;
int dis(int a, int b){ return abs(a-b); }
void input(){
    char line[100];
    sscanf(gets(line),"%d %d",&n,&k);
    scanf("%s",a);
}
void solve(){
    int sum = 0;
    char b[N];
    int trace = 0;
    for(int i = 0;i<n;i++){
        int it = a[i] - 'a';
        int res = max( it, 25 - it);
        sum+=res;
        if(sum<k){
            if(it<=12) b[i] = 'z';
            else       b[i] = 'a';
            trace = i + 1;
        }
        else{
            sum -=res;
            for(int j = 0;j<26;j++){
                int chec = dis(j, it);
                if(chec + sum == k){
                    b[i] = 'a' + j;
                    sum = k;
                    trace = i+1;
                    break;
                }
            }
            break;
        }
    }
    if(sum<k){ printf("-1");return;}
    for(int i = trace;i<n;i++) b[i] = a[i];
    printf("%s",b);
}
int main(){
    input();
    solve();
}


#include<bits/stdc++.h>
using namespace std;
#define          mp                make_pair
#define          pb                push_back
typedef long long int big;
#define         x                  first
#define         y                  second
#define         forn(i, n)         for(int i = 0;i<n;i++)
#define         nfor(i, n)         for(int i = n-1;i>=0;i--)
typedef pair<int, int>             ii;
const int N = 3000;
char a[N];
int n,k;
int dis(int a, int b){ return abs(a-b); }
void input(){
    char line[100];
    sscanf(gets(line),"%d %d",&n,&k);
    scanf("%s",a);
}
void solve(){
    int sum = 0;
    char b[N];
    int trace = 0;
    for(int i = 0;i<n;i++){
        int it = a[i] - 'a';
        int res = max( it, 25 - it);
        sum+=res;
        if(sum<k){
            if(it<=12) b[i] = 'z';
            else       b[i] = 'a';
            trace = i+1;
        }
        else{
            sum -=res;
            for(int j = 0;j<26;j++){
                int chec = dis(j, it);
                if(chec + sum == k){
                    b[i] = 'a' + j;
                    sum = k;
                    trace = i+1;
                    break;
                }
            }
            break;
        }
    }
    if(sum<k){ printf("-1");return;}
    for(int i = trace;i<n;i++) b[i] = a[i];
    printf("%s",b);
}
int main(){
    input();
    solve();
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define forn(i, n) for(ll i = 0;i<n;i++)
#define for1(i, n) for(ll i = 1;i<=n;i++)
const ll N  = 1e5 + 10;
char s[N];
ll n,K;
void input(){
   cin >> n >> K;
   scanf("%s", s + 1);
}
ll dis(ll x,ll y){
   return abs(x - y);
}
char ans[N];
void solve(){
   ll sum = 0;
   ll trace = 0;
   for1(i, n){
       ll val = s[i] - 'a';
       ll add = 0;
       ll cand = 0;
       if(val<=12) cand = 25;
       else cand = 0;
       if(dis(val, cand) + sum <=K){
          ans[i] = cand + 'a';
          sum+= dis(val, cand);
       }
       else{
         for(ll j = 0;j<=25;j++){
            ll d = dis(j, val);
            if(d + sum == K){
                ans[i] = j + 'a';
                sum = K;
                trace = i;
                break;
            }
         }
       }

   }
   if(sum < K) {
    cout<< -1 << endl;
    return;
   }
   for1(i, trace) printf("%c", ans[i]);
   for(ll i = trace + 1;i<=n;i++) printf("%c", s[i]);
}
int main(){
   // freopen("c.c","r",stdin);
   input();
   solve();
}