stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>

#define pi 3.14159

using namespace std;

typedef long long LL;

const LL MOD = 1e9 + 7;

const int N = 2e7 + 9, M = 1e7, OO = 0x3f3f3f3f;

int main()

{

int n;

	string s;



	cin >> n >> s;



	for (int i = 0; i < s.size(); i++) {

		int ch = (s[i] -'A') + n;

		char ch2 = (ch % 26) + 'A';



		cout << (char)ch2 ;



	}

	cout << endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.282302485222738x):
#include <stdio.h>

#include <string.h>

 

int main (){

 

    int n;

    scanf("%d", &n);

    char arr[10000];

    scanf("%s", arr);

    for(int i = 0; i < strlen(arr); i++){

        arr[i] = arr[i] + n;

        if(arr[i] >= 91) arr[i] -= 26;

    }

 

    printf("%s", arr);

 

 	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n,x;

    string s;

    cin>>n>>s;

    for(int i=0 ; i<s.size(); i++)

    {



        x=s[i]+n;

        if(x>90)

        s[i]=65-(91-x);

        else

            s[i]=s[i]+n;

    }

    cout<<s;

   return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.298626100237802x):
#include <stdio.h>

#include <string.h>

 

int main (){

 

    int n;

    scanf("%d", &n);

    char arr[10000];

    scanf("%s", arr);

    for(int i = 0; i < strlen(arr); i++){

        arr[i] = arr[i] + n;

        if(arr[i] >= 91) arr[i] -= 26;

    }

 

    printf("%s", arr);

 

 	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long int ll;

int main()

{

   string s; int i,t, k;

   cin>>k>>s;

   if(k==0) cout<<s;

   else

   {

       for(i=0;i<s.size();i++)

       {

           if( (char) s[i]+k <='Z')

           {

               s[i]=s[i]+k;

           }

           else

           {

              t=64 + (k-( 'Z'-s[i]));

               s[i]=  (char)t;

           }

       }

       cout<<s<<endl;

   }



}


// Faster C++ solution for the same problem (measured speedup: 5.2726582849421675x):
#include <stdio.h>

#include <string.h>

 

int main (){

 

    int n;

    scanf("%d", &n);

    char arr[10000];

    scanf("%s", arr);

    for(int i = 0; i < strlen(arr); i++){

        arr[i] = arr[i] + n;

        if(arr[i] >= 91) arr[i] -= 26;

    }

 

    printf("%s", arr);

 

 	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    string S;

    int n;



    cin >> n;

    cin >> S;

    int len = S.size();

    for(int i = 0; i < len; i++)

    {

        /*while(n--)

        {

            S[i] = S[i]+ 1;

            if(S[i] == 'Z')

            {

                S[i]

            }

        }*/

        S[i] = S[i] + n;

        if(S[i] <= 'Z')

        {

            cout << S[i];

        }

        else

        {

            int x = S[i] - 'Z';

            S[i] = 64 + x;

            cout << S[i];

        }

        

    }

    cout << endl;

}






// Faster C++ solution for the same problem (measured speedup: 5.325077143703505x):
#include <stdio.h>

#include <string.h>

 

int main (){

 

    int n;

    scanf("%d", &n);

    char arr[10000];

    scanf("%s", arr);

    for(int i = 0; i < strlen(arr); i++){

        arr[i] = arr[i] + n;

        if(arr[i] >= 91) arr[i] -= 26;

    }

 

    printf("%s", arr);

 

 	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main() {

	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

	int n;

	string s;

	cin>>n>>s;

	string t;

	for(int i=0; i<(int)s.size(); ++i) {

		int c = (int)s[i] - 'A';

		c = (c+n)%(26);

		t += (char)c+'A';

	}

	cout<<t;

}


// Faster C++ solution for the same problem (measured speedup: 5.1155412394437905x):
#include <stdio.h>



int main (){

	int t;

	scanf("%d", &t);

	getchar();

	char x[100000];

	scanf("%[^\n]", &x);

	for (int i=0; x[i]!='\0'; i++){

		int result = x[i]+t;

		if (result > 'Z'){

			result-=26;

		}

		printf("%c", result);

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define pi 3.14159

using namespace std;

typedef long long LL;

const LL MOD = 1e9 + 7;

const int N = 2e7 + 9, M = 1e7, OO = 0x3f3f3f3f;

int main()

{

int n;

	string s;



	cin >> n >> s;



	for (int i = 0; i < s.size(); i++) {

		int ch = (s[i] -'A') + n;

		char ch2 = (ch % 26) + 'A';



		cout << (char)ch2 ;



	}

	cout << endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.032102322907696x):
#include <stdio.h>



int main (){

	int t;

	scanf("%d", &t);

	getchar();

	char x[100000];

	scanf("%[^\n]", &x);

	for (int i=0; x[i]!='\0'; i++){

		int result = x[i]+t;

		if (result > 'Z'){

			result-=26;

		}

		printf("%c", result);

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n,x;

    string s;

    cin>>n>>s;

    for(int i=0 ; i<s.size(); i++)

    {



        x=s[i]+n;

        if(x>90)

        s[i]=65-(91-x);

        else

            s[i]=s[i]+n;

    }

    cout<<s;

   return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.047652757829844x):
#include <stdio.h>



int main (){

	int t;

	scanf("%d", &t);

	getchar();

	char x[100000];

	scanf("%[^\n]", &x);

	for (int i=0; x[i]!='\0'; i++){

		int result = x[i]+t;

		if (result > 'Z'){

			result-=26;

		}

		printf("%c", result);

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long int ll;

int main()

{

   string s; int i,t, k;

   cin>>k>>s;

   if(k==0) cout<<s;

   else

   {

       for(i=0;i<s.size();i++)

       {

           if( (char) s[i]+k <='Z')

           {

               s[i]=s[i]+k;

           }

           else

           {

              t=64 + (k-( 'Z'-s[i]));

               s[i]=  (char)t;

           }

       }

       cout<<s<<endl;

   }



}


// Faster C++ solution for the same problem (measured speedup: 5.022914927303183x):
#include <stdio.h>



int main (){

	int t;

	scanf("%d", &t);

	getchar();

	char x[100000];

	scanf("%[^\n]", &x);

	for (int i=0; x[i]!='\0'; i++){

		int result = x[i]+t;

		if (result > 'Z'){

			result-=26;

		}

		printf("%c", result);

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    string S;

    int n;



    cin >> n;

    cin >> S;

    int len = S.size();

    for(int i = 0; i < len; i++)

    {

        /*while(n--)

        {

            S[i] = S[i]+ 1;

            if(S[i] == 'Z')

            {

                S[i]

            }

        }*/

        S[i] = S[i] + n;

        if(S[i] <= 'Z')

        {

            cout << S[i];

        }

        else

        {

            int x = S[i] - 'Z';

            S[i] = 64 + x;

            cout << S[i];

        }

        

    }

    cout << endl;

}






// Faster C++ solution for the same problem (measured speedup: 5.072850928067057x):
#include <stdio.h>



int main (){

	int t;

	scanf("%d", &t);

	getchar();

	char x[100000];

	scanf("%[^\n]", &x);

	for (int i=0; x[i]!='\0'; i++){

		int result = x[i]+t;

		if (result > 'Z'){

			result-=26;

		}

		printf("%c", result);

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main() {

	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

	int n;

	string s;

	cin>>n>>s;

	string t;

	for(int i=0; i<(int)s.size(); ++i) {

		int c = (int)s[i] - 'A';

		c = (c+n)%(26);

		t += (char)c+'A';

	}

	cout<<t;

}


// Faster C++ solution for the same problem (measured speedup: 5.369797791038121x):
#include <stdio.h>



int main() {

  int N;

  char S[10002];

  scanf("%d %s", &N, S);



  for(int i = 0; S[i] != '\0'; i++) {

    S[i] = 'A' + (S[i] - 'A' + N) % 26;

  }



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



  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define pi 3.14159

using namespace std;

typedef long long LL;

const LL MOD = 1e9 + 7;

const int N = 2e7 + 9, M = 1e7, OO = 0x3f3f3f3f;

int main()

{

int n;

	string s;



	cin >> n >> s;



	for (int i = 0; i < s.size(); i++) {

		int ch = (s[i] -'A') + n;

		char ch2 = (ch % 26) + 'A';



		cout << (char)ch2 ;



	}

	cout << endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.282211729518881x):
#include <stdio.h>



int main() {

  int N;

  char S[10002];

  scanf("%d %s", &N, S);



  for(int i = 0; S[i] != '\0'; i++) {

    S[i] = 'A' + (S[i] - 'A' + N) % 26;

  }



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



  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n,x;

    string s;

    cin>>n>>s;

    for(int i=0 ; i<s.size(); i++)

    {



        x=s[i]+n;

        if(x>90)

        s[i]=65-(91-x);

        else

            s[i]=s[i]+n;

    }

    cout<<s;

   return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.298535064076479x):
#include <stdio.h>



int main() {

  int N;

  char S[10002];

  scanf("%d %s", &N, S);



  for(int i = 0; S[i] != '\0'; i++) {

    S[i] = 'A' + (S[i] - 'A' + N) % 26;

  }



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



  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long int ll;

int main()

{

   string s; int i,t, k;

   cin>>k>>s;

   if(k==0) cout<<s;

   else

   {

       for(i=0;i<s.size();i++)

       {

           if( (char) s[i]+k <='Z')

           {

               s[i]=s[i]+k;

           }

           else

           {

              t=64 + (k-( 'Z'-s[i]));

               s[i]=  (char)t;

           }

       }

       cout<<s<<endl;

   }



}


// Faster C++ solution for the same problem (measured speedup: 5.272567694936165x):
#include <stdio.h>



int main() {

  int N;

  char S[10002];

  scanf("%d %s", &N, S);



  for(int i = 0; S[i] != '\0'; i++) {

    S[i] = 'A' + (S[i] - 'A' + N) % 26;

  }



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



  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    string S;

    int n;



    cin >> n;

    cin >> S;

    int len = S.size();

    for(int i = 0; i < len; i++)

    {

        /*while(n--)

        {

            S[i] = S[i]+ 1;

            if(S[i] == 'Z')

            {

                S[i]

            }

        }*/

        S[i] = S[i] + n;

        if(S[i] <= 'Z')

        {

            cout << S[i];

        }

        else

        {

            int x = S[i] - 'Z';

            S[i] = 64 + x;

            cout << S[i];

        }

        

    }

    cout << endl;

}






// Faster C++ solution for the same problem (measured speedup: 5.324985653084477x):
#include <stdio.h>



int main() {

  int N;

  char S[10002];

  scanf("%d %s", &N, S);



  for(int i = 0; S[i] != '\0'; i++) {

    S[i] = 'A' + (S[i] - 'A' + N) % 26;

  }



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



  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



const int N = ((int)(1e6))+20;



int a,s,it = 0;

char tab[N];



int main(){

	cin>>s;

	while( cin>>tab[it] ) it++;

	for (int i = 0; i < it; i++){

		int num = int(tab[i]) - int('A');

		num+=s;

		num %= 26;

		cout<<char(int('A') + num);

	}	

}


// Faster C++ solution for the same problem (measured speedup: 5.248311561521008x):
#include <stdio.h>



int main () {

	int n; 

	scanf("%d", &n);

	char string[10005];

	scanf("%s", string);

	for(int i = 0; string[i] != '\0'; i++) {

		string[i] += n;

		if(string[i] > 'Z') {

			string[i] = 64 + (string[i] - 'Z');

		}

	}

	printf("%s", string);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main()

{

long long int N;

cin >> N;

string S;

cin >> S;

long long int i;

for(i=0;S[i] != '\0';i++)

{

    if((S[i]+N) > 90)

            S[i]=((S[i]+N)-90)+64;

    else

        S[i]+=N;

}

cout << S;

}


// Faster C++ solution for the same problem (measured speedup: 5.255413153476075x):
#include <stdio.h>



int main () {

	int n; 

	scanf("%d", &n);

	char string[10005];

	scanf("%s", string);

	for(int i = 0; string[i] != '\0'; i++) {

		string[i] += n;

		if(string[i] > 'Z') {

			string[i] = 64 + (string[i] - 'Z');

		}

	}

	printf("%s", string);

	

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

    int n,i;

    string s;

    cin>>n>>s;

    for(i=0;i<s.length();i++){

        if('Z'-s[i]>=n){s[i]=s[i]+n;}

        else{s[i]=n-26+s[i];}

    }

    cout<<s<<endl;

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.31975081741515x):
#include <stdio.h>



int main () {

	int n; 

	scanf("%d", &n);

	char string[10005];

	scanf("%s", string);

	for(int i = 0; string[i] != '\0'; i++) {

		string[i] += n;

		if(string[i] > 'Z') {

			string[i] = 64 + (string[i] - 'Z');

		}

	}

	printf("%s", string);

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#include<math.h>

using namespace std;

int main()

{

    long long int a=1,b,n,i,j,sum=0;

    string s,s1;

    cin>>n>>s;

    for(i=0;i<s.size();i++)

    {

        a=s[i]-'A';

        b=(a+n)%26;

        s[i]='A'+b;

        cout<<s[i];

    }



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.260613839819155x):
#include <stdio.h>



int main () {

	int n; 

	scanf("%d", &n);

	char string[10005];

	scanf("%s", string);

	for(int i = 0; string[i] != '\0'; i++) {

		string[i] += n;

		if(string[i] > 'Z') {

			string[i] = 64 + (string[i] - 'Z');

		}

	}

	printf("%s", string);

	

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int main(){

    int k;

    cin>>k;

    string s;

    cin>>s;

    for (int i = 0; i< s.size(); i++){

        s[i] += k;

        if (s[i] > 'Z'){

            s[i] = 64 + (s[i] - 'Z');

        }

    }

    cout<<s;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.29805244353465x):
#include <stdio.h>



int main () {

	int n; 

	scanf("%d", &n);

	char string[10005];

	scanf("%s", string);

	for(int i = 0; string[i] != '\0'; i++) {

		string[i] += n;

		if(string[i] > 'Z') {

			string[i] = 64 + (string[i] - 'Z');

		}

	}

	printf("%s", string);

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

vector<int>v;

int main()

{

  int n,k;

  cin>>n;

  string s;

  cin>>s;

  for(int i=0;i<s.size();i++)

  {

     v.push_back(s[i]);

  }

  for(int i=0;i<s.size();i++)

  {

      k=v[i]+n;

    if(k<=90)

        cout<<char(k);

    else

    {

        cout<<char(k-26);

    }

  }

  cout<<endl;



}


// Faster C++ solution for the same problem (measured speedup: 5.332382974800055x):
#include <stdio.h>



int main () {

	int n; 

	scanf("%d", &n);

	char string[10005];

	scanf("%s", string);

	for(int i = 0; string[i] != '\0'; i++) {

		string[i] += n;

		if(string[i] > 'Z') {

			string[i] = 64 + (string[i] - 'Z');

		}

	}

	printf("%s", string);

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef vector<int> vi;

typedef vector<string> vs;

typedef vector<double> vd;

typedef set<int> si;

typedef set<string> ss;

typedef map<int,int> mii;

typedef map<string,int>msi;

typedef map<string,string>mss;

void solve(){

    string inp,res="";

    int n;

    cin>>n;

    cin>>inp;

    for(int i=0;i<inp.size();i++){

        char ch = inp[i];

        ch+=n;

        if(ch>'Z'){

            ch-=26;

        }

        res+=ch;

    }

    cout<<res<<endl;

}

int main(){

    int t;

    t=1;

    while(t--){

       solve();

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.314991666763296x):
#include <stdio.h>



int main () {

	int n; 

	scanf("%d", &n);

	char string[10005];

	scanf("%s", string);

	for(int i = 0; string[i] != '\0'; i++) {

		string[i] += n;

		if(string[i] > 'Z') {

			string[i] = 64 + (string[i] - 'Z');

		}

	}

	printf("%s", string);

	

	return 0;

}
// Slower C++ solution:
/*=============================================================================================================================/*

                                               Bismillahir Rahmanir Rahim



      _     ____  ___  ____   _   _  _         ___  ____   _         _     __  __

     / \   / ___||_ _|| __ ) | | | || |       |_ _|/ ___| | |       / \   |  \/  |

    / _ \  \___ \ | | |  _ \ | | | || |        | | \___ \ | |      / _ \  | |\/| |

   / ___ \  ___) || | | |_) || |_| || |___     | |  ___) || |___  / ___ \ | |  | |

  /_/   \_\|____/|___||____/  \___/ |_____|   |___||____/ |_____|/_/   \_\|_|  |_|



   _   __           __  __  __

  |_) (_  _  o__   /   (_  |_

  |_)o__)(_  || |  \__ __) |__



    ___                    _   _      _                _ _               __   ___                 _         _        _

   / __|_ _ ___ ___ _ _   | | | |_ _ (_)_ _____ _ _ __(_) |_ _  _   ___ / _| | _ ) __ _ _ _  __ _| |__ _ __| |___ __| |_

  | (_ | '_/ -_) -_) ' \  | |_| | ' \| \ V / -_) '_(_-< |  _| || | / _ \  _| | _ \/ _` | ' \/ _` | / _` / _` / -_|_-< ' \

   \___|_| \___\___|_||_|  \___/|_||_|_|\_/\___|_| /__/_|\__|\_, | \___/_|   |___/\__,_|_||_\__, |_\__,_\__,_\___/__/_||_|

                                                            |__/                           |___/





   FB: https://facebook.com/SIAsibul

   Gmail: asibulislam8@gmail.com



/*=============================================================================================================================*/



#include<bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef unsigned long long ull;

typedef vector<int> vi;

typedef vector<ll> vl;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

typedef pair<ll, int> pli;

typedef pair<int, ll> pil;

typedef vector<pii> vii;

typedef vector<pil> vil;

typedef vector<pli> vli;

typedef vector<pll> vll;



#define ff first

#define ss second

#define pb push_back

#define mp make_pair

#define sz size()

#define all(a)  a.begin(), a.end()

#define mem(a, b)     memset(a, b, sizeof(a))

#define f0(i,n) for(int i=0;i<(n);i++)

#define f1(i,n) for(int i=1;i<=(n);i++)

#define f2(i,a,n) for(int i=(a);i<=(n);i++)

#define fr(i,n,a) for(int i=(n);i>=(a);i--)

#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))

#define nl "\n"





const int INF = 1e9 + 5;

const int MXN = 2e5 + 5;





int main(){

    int n;

    cin >> n;



    string s;

    cin >> s;



    f0(i, s.size())

        s[i] = (s[i] - 'A' + n) % 26 + 'A';



    cout << s << nl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.307570348892951x):
#include <stdio.h>



int main () {

	int n; 

	scanf("%d", &n);

	char string[10005];

	scanf("%s", string);

	for(int i = 0; string[i] != '\0'; i++) {

		string[i] += n;

		if(string[i] > 'Z') {

			string[i] = 64 + (string[i] - 'Z');

		}

	}

	printf("%s", string);

	

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define     LL              long long int

#define     FOR(I,A,B)      for( int I = A; I < B; ++I )

#define     SFI(X)          scanf("%d",&X)

#define     SFL(X)          scanf("%lld",&X)





int main() {



    int n;

    string s;



    scanf("%d",&n);

    cin >> s;



    for(int i=0;i<s.length();i++){

        s[i] = (s[i] - 'A' + n) % 26 + 'A';

    }



    cout << s << endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.289716732172063x):
#include <stdio.h>



int main () {

	int n; 

	scanf("%d", &n);

	char string[10005];

	scanf("%s", string);

	for(int i = 0; string[i] != '\0'; i++) {

		string[i] += n;

		if(string[i] > 'Z') {

			string[i] = 64 + (string[i] - 'Z');

		}

	}

	printf("%s", string);

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



const int N = ((int)(1e6))+20;



int a,s,it = 0;

char tab[N];



int main(){

	cin>>s;

	while( cin>>tab[it] ) it++;

	for (int i = 0; i < it; i++){

		int num = int(tab[i]) - int('A');

		num+=s;

		num %= 26;

		cout<<char(int('A') + num);

	}	

}


// Faster C++ solution for the same problem (measured speedup: 5.21643118341158x):
#include <stdio.h>

#include <string.h>



int main(){

	int number;

	char str[10000];

	scanf("%d",&number);

	int temp = number;

	scanf("%s",&str);

	int len = strlen (str);

	for (int i = 0; i < len; i++){

		temp = number;

		if (str[i] + number > 'Z'){

			int temp2 = 'Z' - str[i]+1;

			temp -=temp2;

			str[i]='A';

		}

		str[i] += temp;

	}

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

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main()

{

long long int N;

cin >> N;

string S;

cin >> S;

long long int i;

for(i=0;S[i] != '\0';i++)

{

    if((S[i]+N) > 90)

            S[i]=((S[i]+N)-90)+64;

    else

        S[i]+=N;

}

cout << S;

}


// Faster C++ solution for the same problem (measured speedup: 5.223489637409983x):
#include <stdio.h>

#include <string.h>



int main(){

	int number;

	char str[10000];

	scanf("%d",&number);

	int temp = number;

	scanf("%s",&str);

	int len = strlen (str);

	for (int i = 0; i < len; i++){

		temp = number;

		if (str[i] + number > 'Z'){

			int temp2 = 'Z' - str[i]+1;

			temp -=temp2;

			str[i]='A';

		}

		str[i] += temp;

	}

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

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

    int n,i;

    string s;

    cin>>n>>s;

    for(i=0;i<s.length();i++){

        if('Z'-s[i]>=n){s[i]=s[i]+n;}

        else{s[i]=n-26+s[i];}

    }

    cout<<s<<endl;

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.287436488222014x):
#include <stdio.h>

#include <string.h>



int main(){

	int number;

	char str[10000];

	scanf("%d",&number);

	int temp = number;

	scanf("%s",&str);

	int len = strlen (str);

	for (int i = 0; i < len; i++){

		temp = number;

		if (str[i] + number > 'Z'){

			int temp2 = 'Z' - str[i]+1;

			temp -=temp2;

			str[i]='A';

		}

		str[i] += temp;

	}

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

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#include<math.h>

using namespace std;

int main()

{

    long long int a=1,b,n,i,j,sum=0;

    string s,s1;

    cin>>n>>s;

    for(i=0;i<s.size();i++)

    {

        a=s[i]-'A';

        b=(a+n)%26;

        s[i]='A'+b;

        cout<<s[i];

    }



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.228658732669892x):
#include <stdio.h>

#include <string.h>



int main(){

	int number;

	char str[10000];

	scanf("%d",&number);

	int temp = number;

	scanf("%s",&str);

	int len = strlen (str);

	for (int i = 0; i < len; i++){

		temp = number;

		if (str[i] + number > 'Z'){

			int temp2 = 'Z' - str[i]+1;

			temp -=temp2;

			str[i]='A';

		}

		str[i] += temp;

	}

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

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int main(){

    int k;

    cin>>k;

    string s;

    cin>>s;

    for (int i = 0; i< s.size(); i++){

        s[i] += k;

        if (s[i] > 'Z'){

            s[i] = 64 + (s[i] - 'Z');

        }

    }

    cout<<s;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.265869919085871x):
#include <stdio.h>

#include <string.h>



int main(){

	int number;

	char str[10000];

	scanf("%d",&number);

	int temp = number;

	scanf("%s",&str);

	int len = strlen (str);

	for (int i = 0; i < len; i++){

		temp = number;

		if (str[i] + number > 'Z'){

			int temp2 = 'Z' - str[i]+1;

			temp -=temp2;

			str[i]='A';

		}

		str[i] += temp;

	}

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

	return 0;

}