stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<iostream>

#include<cstring>

using namespace std;



int main()

{

    int n;

    string s;

    cin >> n >> s;

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

    {

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

        if(s[i]>90)

            s[i]=s[i]-26;

    }

    cout << s <<endl;

    return 0;

}


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



int main(){

	int geser;

	char t[10010];

	scanf("%d", &geser);

	scanf("%s", t);

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

		t[i]+= geser;

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

			t[i]-=26;

		}

		printf("%c", t[i]);

	}

	puts("");

	return 0;

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



using namespace std;



int main()

{

	int n; string s;

	cin >> n;

	cin >> s;

	if (n > 0)

	{

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

		{

			int auxletter = int ( s[i] ) + n;

			if( auxletter >= 91 ) auxletter = 65 + ( auxletter - 91 );  

		

			s[i] = char(auxletter);

		}

	}

	

	

	cout << s;

	return 0;

}

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



int main(){

	int geser;

	char t[10010];

	scanf("%d", &geser);

	scanf("%s", t);

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

		t[i]+= geser;

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

			t[i]-=26;

		}

		printf("%c", t[i]);

	}

	puts("");

	return 0;

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

#include <string>



using namespace std;

string s;

int n;



int main(){

    ios_base::sync_with_stdio(0);

    cin.tie(NULL);

    cin >> n >> s;

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

        if(s[i]+n > 90) cout << (char)(s[i]+n-26);

        else cout << (char)(s[i]+n);

    }

    return 0;

}

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



int main(){

	int geser;

	char t[10010];

	scanf("%d", &geser);

	scanf("%s", t);

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

		t[i]+= geser;

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

			t[i]-=26;

		}

		printf("%c", t[i]);

	}

	puts("");

	return 0;

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

using namespace std;

typedef long long ll;

int main()

{

    int n;

    cin>>n;

    string s;

    cin>>s;

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

    {

        int re=s[i];

        re=re+n;



        if(re>90 && (s[i]>='A' && s[i]<='Z'))

        {

            re=re-26;

        }

        char a=re;

        cout<<a;

    }

    return 0;





}


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



int main(){

	int geser;

	char t[10010];

	scanf("%d", &geser);

	scanf("%s", t);

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

		t[i]+= geser;

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

			t[i]-=26;

		}

		printf("%c", t[i]);

	}

	puts("");

	return 0;

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

#include <cstdio>

#include <cmath>

#include <algorithm>



using namespace std;



char N;

int s;



int main()

{

	cin>>s;

	while(cin>>N)

	{

		N+=s;

		if(N>'Z')

		{

			N-=26;

		}

		cout<<N;

	}

}


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



int main () {

	int a ;

	scanf ("%d",&a);

	char n[10000];

	scanf ("%s",n);

	for (int i = 0 ; n[i] != 0 ; i++) {

		if (n[i]+a>'Z') {

			n[i] = n[i] - 26;

		}

		printf("%c",n[i] +a);

	}

	return 0;

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

using namespace std;

char shift(char ch,int N){

    int d = ch-'A';

    int dn=0;

    if(N+d>25) dn = N+d-26;

    else dn = N+d;

    return (char)(dn+'A');

}

int main (){

    int N;cin >> N;

    string S;cin>>S;

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

        S[i]=shift(S[i],N);

    }

    cout<<S<<endl;

    return 0;

}


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



int main () {

	int a ;

	scanf ("%d",&a);

	char n[10000];

	scanf ("%s",n);

	for (int i = 0 ; n[i] != 0 ; i++) {

		if (n[i]+a>'Z') {

			n[i] = n[i] - 26;

		}

		printf("%c",n[i] +a);

	}

	return 0;

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

#include<cstring>

using namespace std;



int main()

{

    int n;

    string s;

    cin >> n >> s;

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

    {

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

        if(s[i]>90)

            s[i]=s[i]-26;

    }

    cout << s <<endl;

    return 0;

}


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



int main () {

	int a ;

	scanf ("%d",&a);

	char n[10000];

	scanf ("%s",n);

	for (int i = 0 ; n[i] != 0 ; i++) {

		if (n[i]+a>'Z') {

			n[i] = n[i] - 26;

		}

		printf("%c",n[i] +a);

	}

	return 0;

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



using namespace std;



int main()

{

	int n; string s;

	cin >> n;

	cin >> s;

	if (n > 0)

	{

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

		{

			int auxletter = int ( s[i] ) + n;

			if( auxletter >= 91 ) auxletter = 65 + ( auxletter - 91 );  

		

			s[i] = char(auxletter);

		}

	}

	

	

	cout << s;

	return 0;

}

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



int main () {

	int a ;

	scanf ("%d",&a);

	char n[10000];

	scanf ("%s",n);

	for (int i = 0 ; n[i] != 0 ; i++) {

		if (n[i]+a>'Z') {

			n[i] = n[i] - 26;

		}

		printf("%c",n[i] +a);

	}

	return 0;

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

#include <string>



using namespace std;

string s;

int n;



int main(){

    ios_base::sync_with_stdio(0);

    cin.tie(NULL);

    cin >> n >> s;

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

        if(s[i]+n > 90) cout << (char)(s[i]+n-26);

        else cout << (char)(s[i]+n);

    }

    return 0;

}

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



int main () {

	int a ;

	scanf ("%d",&a);

	char n[10000];

	scanf ("%s",n);

	for (int i = 0 ; n[i] != 0 ; i++) {

		if (n[i]+a>'Z') {

			n[i] = n[i] - 26;

		}

		printf("%c",n[i] +a);

	}

	return 0;

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

using namespace std;

typedef long long ll;

int main()

{

    int n;

    cin>>n;

    string s;

    cin>>s;

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

    {

        int re=s[i];

        re=re+n;



        if(re>90 && (s[i]>='A' && s[i]<='Z'))

        {

            re=re-26;

        }

        char a=re;

        cout<<a;

    }

    return 0;





}


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



int main () {

	int a ;

	scanf ("%d",&a);

	char n[10000];

	scanf ("%s",n);

	for (int i = 0 ; n[i] != 0 ; i++) {

		if (n[i]+a>'Z') {

			n[i] = n[i] - 26;

		}

		printf("%c",n[i] +a);

	}

	return 0;

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

#include <cstdio>

#include <cmath>

#include <algorithm>



using namespace std;



char N;

int s;



int main()

{

	cin>>s;

	while(cin>>N)

	{

		N+=s;

		if(N>'Z')

		{

			N-=26;

		}

		cout<<N;

	}

}


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



int main(){

	int N;

	scanf("%d", &N);

	char s[10000];

	scanf("%s", s);

	

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

		if(s[i] + N > 90){

		s[i] = s[i] + N - 26;

		}else{

			s[i] += N;

		}

	}

	printf("%s", s);

	return 0;

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

using namespace std;

char shift(char ch,int N){

    int d = ch-'A';

    int dn=0;

    if(N+d>25) dn = N+d-26;

    else dn = N+d;

    return (char)(dn+'A');

}

int main (){

    int N;cin >> N;

    string S;cin>>S;

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

        S[i]=shift(S[i],N);

    }

    cout<<S<<endl;

    return 0;

}


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



int main(){

	int N;

	scanf("%d", &N);

	char s[10000];

	scanf("%s", s);

	

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

		if(s[i] + N > 90){

		s[i] = s[i] + N - 26;

		}else{

			s[i] += N;

		}

	}

	printf("%s", s);

	return 0;

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

#include<cstring>

using namespace std;



int main()

{

    int n;

    string s;

    cin >> n >> s;

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

    {

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

        if(s[i]>90)

            s[i]=s[i]-26;

    }

    cout << s <<endl;

    return 0;

}


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



int main(){

	int N;

	scanf("%d", &N);

	char s[10000];

	scanf("%s", s);

	

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

		if(s[i] + N > 90){

		s[i] = s[i] + N - 26;

		}else{

			s[i] += N;

		}

	}

	printf("%s", s);

	return 0;

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



using namespace std;



int main()

{

	int n; string s;

	cin >> n;

	cin >> s;

	if (n > 0)

	{

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

		{

			int auxletter = int ( s[i] ) + n;

			if( auxletter >= 91 ) auxletter = 65 + ( auxletter - 91 );  

		

			s[i] = char(auxletter);

		}

	}

	

	

	cout << s;

	return 0;

}

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



int main(){

	int N;

	scanf("%d", &N);

	char s[10000];

	scanf("%s", s);

	

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

		if(s[i] + N > 90){

		s[i] = s[i] + N - 26;

		}else{

			s[i] += N;

		}

	}

	printf("%s", s);

	return 0;

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

#include <string>



using namespace std;

string s;

int n;



int main(){

    ios_base::sync_with_stdio(0);

    cin.tie(NULL);

    cin >> n >> s;

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

        if(s[i]+n > 90) cout << (char)(s[i]+n-26);

        else cout << (char)(s[i]+n);

    }

    return 0;

}

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



int main(){

	int N;

	scanf("%d", &N);

	char s[10000];

	scanf("%s", s);

	

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

		if(s[i] + N > 90){

		s[i] = s[i] + N - 26;

		}else{

			s[i] += N;

		}

	}

	printf("%s", s);

	return 0;

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

using namespace std;

typedef long long ll;

int main()

{

    int n;

    cin>>n;

    string s;

    cin>>s;

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

    {

        int re=s[i];

        re=re+n;



        if(re>90 && (s[i]>='A' && s[i]<='Z'))

        {

            re=re-26;

        }

        char a=re;

        cout<<a;

    }

    return 0;





}


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



int main(){

	int N;

	scanf("%d", &N);

	char s[10000];

	scanf("%s", s);

	

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

		if(s[i] + N > 90){

		s[i] = s[i] + N - 26;

		}else{

			s[i] += N;

		}

	}

	printf("%s", s);

	return 0;

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

#include <cstdio>

#include <cmath>

#include <algorithm>



using namespace std;



char N;

int s;



int main()

{

	cin>>s;

	while(cin>>N)

	{

		N+=s;

		if(N>'Z')

		{

			N-=26;

		}

		cout<<N;

	}

}


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



int main () {

	int test;

	scanf("%d", &test);

	char alpha[10000], hasil[10000];

	scanf("%s", &alpha);

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

			hasil[i] = alpha[i] + test;

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

				hasil[i]-= 26;

			}

		printf("%c", hasil[i]);

		}

	return 0;

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

using namespace std;

char shift(char ch,int N){

    int d = ch-'A';

    int dn=0;

    if(N+d>25) dn = N+d-26;

    else dn = N+d;

    return (char)(dn+'A');

}

int main (){

    int N;cin >> N;

    string S;cin>>S;

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

        S[i]=shift(S[i],N);

    }

    cout<<S<<endl;

    return 0;

}


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



int main () {

	int test;

	scanf("%d", &test);

	char alpha[10000], hasil[10000];

	scanf("%s", &alpha);

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

			hasil[i] = alpha[i] + test;

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

				hasil[i]-= 26;

			}

		printf("%c", hasil[i]);

		}

	return 0;

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

#include<cstring>

using namespace std;



int main()

{

    int n;

    string s;

    cin >> n >> s;

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

    {

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

        if(s[i]>90)

            s[i]=s[i]-26;

    }

    cout << s <<endl;

    return 0;

}


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



int main () {

	int test;

	scanf("%d", &test);

	char alpha[10000], hasil[10000];

	scanf("%s", &alpha);

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

			hasil[i] = alpha[i] + test;

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

				hasil[i]-= 26;

			}

		printf("%c", hasil[i]);

		}

	return 0;

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



using namespace std;



int main()

{

	int n; string s;

	cin >> n;

	cin >> s;

	if (n > 0)

	{

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

		{

			int auxletter = int ( s[i] ) + n;

			if( auxletter >= 91 ) auxletter = 65 + ( auxletter - 91 );  

		

			s[i] = char(auxletter);

		}

	}

	

	

	cout << s;

	return 0;

}

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



int main () {

	int test;

	scanf("%d", &test);

	char alpha[10000], hasil[10000];

	scanf("%s", &alpha);

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

			hasil[i] = alpha[i] + test;

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

				hasil[i]-= 26;

			}

		printf("%c", hasil[i]);

		}

	return 0;

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

#include <string>



using namespace std;

string s;

int n;



int main(){

    ios_base::sync_with_stdio(0);

    cin.tie(NULL);

    cin >> n >> s;

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

        if(s[i]+n > 90) cout << (char)(s[i]+n-26);

        else cout << (char)(s[i]+n);

    }

    return 0;

}

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



int main () {

	int test;

	scanf("%d", &test);

	char alpha[10000], hasil[10000];

	scanf("%s", &alpha);

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

			hasil[i] = alpha[i] + test;

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

				hasil[i]-= 26;

			}

		printf("%c", hasil[i]);

		}

	return 0;

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

using namespace std;

typedef long long ll;

int main()

{

    int n;

    cin>>n;

    string s;

    cin>>s;

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

    {

        int re=s[i];

        re=re+n;



        if(re>90 && (s[i]>='A' && s[i]<='Z'))

        {

            re=re-26;

        }

        char a=re;

        cout<<a;

    }

    return 0;





}


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



int main () {

	int test;

	scanf("%d", &test);

	char alpha[10000], hasil[10000];

	scanf("%s", &alpha);

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

			hasil[i] = alpha[i] + test;

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

				hasil[i]-= 26;

			}

		printf("%c", hasil[i]);

		}

	return 0;

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

#include <cstdio>

#include <cmath>

#include <algorithm>



using namespace std;



char N;

int s;



int main()

{

	cin>>s;

	while(cin>>N)

	{

		N+=s;

		if(N>'Z')

		{

			N-=26;

		}

		cout<<N;

	}

}


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



	int main(){

		int n;

		char c[10002];

		scanf("%d %s",&n, c);

		

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

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

		}

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

		return 0;

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

using namespace std;

char shift(char ch,int N){

    int d = ch-'A';

    int dn=0;

    if(N+d>25) dn = N+d-26;

    else dn = N+d;

    return (char)(dn+'A');

}

int main (){

    int N;cin >> N;

    string S;cin>>S;

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

        S[i]=shift(S[i],N);

    }

    cout<<S<<endl;

    return 0;

}


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



	int main(){

		int n;

		char c[10002];

		scanf("%d %s",&n, c);

		

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

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

		}

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

		return 0;

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

#include<cstring>

using namespace std;



int main()

{

    int n;

    string s;

    cin >> n >> s;

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

    {

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

        if(s[i]>90)

            s[i]=s[i]-26;

    }

    cout << s <<endl;

    return 0;

}


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



	int main(){

		int n;

		char c[10002];

		scanf("%d %s",&n, c);

		

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

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

		}

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

		return 0;

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



using namespace std;



int main()

{

	int n; string s;

	cin >> n;

	cin >> s;

	if (n > 0)

	{

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

		{

			int auxletter = int ( s[i] ) + n;

			if( auxletter >= 91 ) auxletter = 65 + ( auxletter - 91 );  

		

			s[i] = char(auxletter);

		}

	}

	

	

	cout << s;

	return 0;

}

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



	int main(){

		int n;

		char c[10002];

		scanf("%d %s",&n, c);

		

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

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

		}

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

		return 0;

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

#include <string>



using namespace std;

string s;

int n;



int main(){

    ios_base::sync_with_stdio(0);

    cin.tie(NULL);

    cin >> n >> s;

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

        if(s[i]+n > 90) cout << (char)(s[i]+n-26);

        else cout << (char)(s[i]+n);

    }

    return 0;

}

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



	int main(){

		int n;

		char c[10002];

		scanf("%d %s",&n, c);

		

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

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

		}

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

		return 0;

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

using namespace std;

typedef long long ll;

int main()

{

    int n;

    cin>>n;

    string s;

    cin>>s;

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

    {

        int re=s[i];

        re=re+n;



        if(re>90 && (s[i]>='A' && s[i]<='Z'))

        {

            re=re-26;

        }

        char a=re;

        cout<<a;

    }

    return 0;





}


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



	int main(){

		int n;

		char c[10002];

		scanf("%d %s",&n, c);

		

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

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

		}

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

		return 0;

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

#include <cstring>

using namespace std;

int main()

{

	int N;

	char a[10005];

	cin>>N>>a;

	for(int i=0;i<strlen(a);i++)

	{

		a[i]+=N;

		if(a[i]>'Z')

			a[i]-=26;

	}

	cout<<a;

} 

// Faster C++ solution for the same problem (measured speedup: 5.22621562531516x):
#include<cstdio>

#include<cstring>

char cha[10005];

int n;

void f(){

	int len=strlen(cha);

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

		if(cha[i]+n>'Z')cha[i]-=26;

		cha[i]+=n;

	}

}

int main(){

	

	scanf("%d",&n);

	scanf("%s",cha);

	f();

	printf("%s",cha);

	

	return 0;

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

#include <cstring>

using namespace std;

int main()

{

	int N;

	char a[10005];

	cin>>N>>a;

	for(int i=0;i<strlen(a);i++)

	{

		a[i]+=N;

		if(a[i]>'Z')

			a[i]-=26;

	}

	cout<<a;

} 

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



int main(){

	int n;

	scanf("%d", &n);

	char inp[10001];

	scanf("%s", inp);



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

		if(inp[i]+n>'Z'){

			inp[i]=inp[i]+n-26;

		}else{

			inp[i]+=n;

		}

	}

	printf("%s", inp);

	return 0;

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



using namespace std;



int ans[10000 + 5];



int main(){

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

	

	int n;

	cin >> n;

	string s;

	cin >> s;

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

		int x = (int) s[i - 1];

		x -= 65;

		x += n;

		x %= 26;

		x += 65;

		ans[i] = x;

	}

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

		cout << (char) ans[i];

	

	return 0;

}




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



int main(){

	int n;

	scanf("%d", &n);

	char inp[10001];

	scanf("%s", inp);



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

		if(inp[i]+n>'Z'){

			inp[i]=inp[i]+n-26;

		}else{

			inp[i]+=n;

		}

	}

	printf("%s", inp);

	return 0;

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

* AUTHOR : RAJAGOPALAN *

* NICK : ARNO *

* INSTITUTION : VIT *

******************************************/

#include <bits/stdc++.h>

#include <ext/pb_ds/detail/standard_policies.hpp>

#define ll long long

#define ull unsigned long long

#define pb push_back

#define mp make_pair

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

#define alli(a, n, k) (a+k),(a+n+k)

#define FP(i, a, b, k) for(__typeof(a) i = a;i < b;i += k)

#define FS(i, a, b, k) for(__typeof(a) i = a;i > b;i -= k)

#define IT(it, a) for(__typeof(a.begin()) it = a.begin();it != a.end(); ++it)

#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>

#define eps 1e-6

#define pi 3.141592653589793

using namespace std;

using namespace __gnu_pbds;



template<class T> inline T gcd(T x, T y) { if (!y) return x; return gcd(y, x%y);}

typedef vector<int> VII;

typedef vector<ll> VLL;

typedef pair<int, int> PII;

typedef vector< pair<int, int> > VPII;

typedef vector< pair<int, PII > > VPPI;

const int MOD = 1e9 + 7;

const int INF = 1e9;



inline ll modulo(ll a, ll m)

{

    return (a % m + m) % m;

}



inline ll modInverse(ll a, ll m)

{

    assert(__gcd(a, m) == 1);

    ll m0 = m;

    ll y = 0, x = 1;



    if (m == 1)

        return 0;



    while (a > 1)

    {

        ll q = a / m;

        ll t = m;



        m = a % m, a = t;

        t = y;



        y = x - q * y;

        x = t;

    }



    if (x < 0)

        x += m0;



    return x;

}



inline ll modPow(ll x, ll y, ll m)

{ //x^y % m

    if (y == 0)

        return 1LL;

    else if (y == 1)

        return x;

    else

    {

        ll ans = modPow(x, y / 2, m) % m;

        if (y & 1)

        {

            return (((ans * ans) % m) * x) % m;

        }

        else

        {

            return (ans * ans) % m;

        }

    }

}



int main(int argc, char* argv[])

{

    ios::sync_with_stdio(false);

    cin.tie(NULL);

    int n;

    string s;

    cin>>n>>s;

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

    {

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

    }

    cout<<s;

    return 0;

}

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



int main(){

	int n;

	scanf("%d", &n);

	char inp[10001];

	scanf("%s", inp);



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

		if(inp[i]+n>'Z'){

			inp[i]=inp[i]+n-26;

		}else{

			inp[i]+=n;

		}

	}

	printf("%s", inp);

	return 0;

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

using namespace std;

int main()

{

	int n,i,cap;

	string s;

	cin>>n;

	cin>>s;

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

		cap=s[i]+n;

		if(cap<=90){

			s[i]=cap;

		}

		else if(cap>90){

			s[i]=cap-26;

		}

	}

	cout<<s<<endl;

}

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



int main(){

	int n;

	scanf("%d", &n);

	char inp[10001];

	scanf("%s", inp);



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

		if(inp[i]+n>'Z'){

			inp[i]=inp[i]+n-26;

		}else{

			inp[i]+=n;

		}

	}

	printf("%s", inp);

	return 0;

}