stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include<cstdio>

#include<algorithm>

#include<set>

#define maxn 100005

#define maxm 15

#define LL long long

using namespace std;

typedef pair<int,int> PII;

set<PII> used;

int h,w,n,dir[9][2]={{0,0},{1,0},{0,1},{-1,0},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1}};

PII a[maxn];

LL ans[maxm];

int main()

{

	scanf("%d%d%d",&h,&w,&n);

	for(int i=1;i<=n;i++) scanf("%d%d",&a[i].first,&a[i].second);

	sort(a+1,a+n+1);

	ans[0]=1ll*(h-2)*(w-2);

	for(int i=1;i<=n;i++)

	{

		int cnt,x=a[i].first,y=a[i].second;

		//if(x==1||y==1||x==h||y==w) continue;

		for(int j=0;j<9;j++)

		{

			cnt=0;

			int tx=x+dir[j][0],ty=y+dir[j][1];

			if(tx<=1||ty<=1||tx>=h||ty>=w) continue;

			if(used.find(PII(tx,ty))!=used.end()) continue;

			cnt+=upper_bound(a+1,a+n+1,PII(tx-1,ty+1))-lower_bound(a+1,a+n+1,PII(tx-1,ty-1));

			cnt+=upper_bound(a+1,a+n+1,PII(tx,ty+1))-lower_bound(a+1,a+n+1,PII(tx,ty-1));

			cnt+=upper_bound(a+1,a+n+1,PII(tx+1,ty+1))-lower_bound(a+1,a+n+1,PII(tx+1,ty-1));

			ans[cnt]++;

			ans[0]--;

			used.insert(PII(tx,ty));

			//printf(" * %d %d %d\n",tx,ty,cnt);

		}

	}

	for(int i=0;i<=9;i++) printf("%lld\n",ans[i]);

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

#define ll long long

int H,W,N;

ll arr[1000005];

ll ans[10];

ll d=1e9+7;

int main()

{

    scanf("%d%d%d",&H,&W,&N);

    int x,y;

    int xx,yy;

    int count=0;

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

    {

       scanf("%d%d",&x,&y);

       for(int i=-1;i<=1;i++)

       {

           for(int j=-1;j<=1;j++)

           {

               xx=x+i;

               yy=y+j;

               if(xx>1&&xx<H&&yy>1&&yy<W)

                    arr[count++]=xx*d+yy;

           }

       }

    }

    sort(arr,arr+count);

    int c=1;

    ll z=(ll)(H-2)*(ll)(W-2);

    memset(ans,0,sizeof(ans));

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

    {

        if(arr[i]==arr[i+1])

            c++;

        else

        {

            z--;

            ans[c]++;

            c=1;

        }

    }

    printf("%lld\n",z);

    for(int i=1;i<10;i++)

        printf("%lld\n",ans[i]);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio>

#include<iostream>

#include<cstring>

#include<algorithm>

using namespace std;

typedef long long ll;

const int MAXN=int(1e5)+7;

int x,y,h,w,n;

ll ans[20],base=int(1e9)+7,zero,a[MAXN<<4],tot;

int main()

{

	scanf("%d%d%d",&h,&w,&n);

	zero=1ll*(h-2)*(w-2);

	while(n--)

	{

		scanf("%d%d",&x,&y);

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

			for(int j=0;j<3;j++)

				if(1<=x-i&&x-i<=h-2&&1<=y-j&&y-j<=w-2)

					a[tot++]=base*(x-i)+(y-j);

	}

	sort(a,a+tot);

	for(int i=0,cnt=1;i<tot;i++)

	{

		if(a[i]==a[i+1])

			cnt++;

		else

			ans[cnt]++,cnt=1,zero--;	

	}

	printf("%lld\n",zero);

	for(int i=1;i<10;i++)

		printf("%lld\n",ans[i]);

	return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

#define ll long long

int H,W,N;

ll arr[1000005];

ll ans[10];

ll d=1e9+7;

int main()

{

    scanf("%d%d%d",&H,&W,&N);

    int x,y;

    int xx,yy;

    int count=0;

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

    {

       scanf("%d%d",&x,&y);

       for(int i=-1;i<=1;i++)

       {

           for(int j=-1;j<=1;j++)

           {

               xx=x+i;

               yy=y+j;

               if(xx>1&&xx<H&&yy>1&&yy<W)

                    arr[count++]=xx*d+yy;

           }

       }

    }

    sort(arr,arr+count);

    int c=1;

    ll z=(ll)(H-2)*(ll)(W-2);

    memset(ans,0,sizeof(ans));

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

    {

        if(arr[i]==arr[i+1])

            c++;

        else

        {

            z--;

            ans[c]++;

            c=1;

        }

    }

    printf("%lld\n",z);

    for(int i=1;i<10;i++)

        printf("%lld\n",ans[i]);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio>

#include<iostream>

#include<cstring>

#include<algorithm>

#define RG register

#define LL long long

using namespace std;

const int N=9e5+10;

int n,cnt,num=1;

LL h,w,col[N],ans[12],zro;

template<typename I> inline void read(I &ot){

	I ch=getchar(), x=0, f=1;

	while(ch<'0' || ch>'9'){if(ch=='-') f=-1; ch=getchar();	}

	while(ch>='0' && ch<='9'){x=x*10+ch-'0'; ch=getchar();	}

	ot=x*f;}

template<typename I, typename... U> inline void read(I &x,U&... y){read(x); read(y...);}

int main()

{

//	freopen("Snuke's Coloring.in","r",stdin);

	//freopen(".out","w",stdout);

	read(h,w,n); zro=(h-2)*(w-2);

	for(int i=1,a,b;i<=n;i++)

	{

		read(a,b);

		for(int x=-2;x<=0;x++)

		 for(int y=-2;y<=0;y++)

		  if(a+x>0 && a+x<=h-2 && b+y>0 && b+y<=w-2)

		   col[++cnt]=(a+x-1)*(w-2)+(b+y);

	}

	sort(col+1,col+cnt+1);

	for(int i=1;i<=cnt;i++)

	 if(col[i]==col[i+1]) num++;

	 else ans[num]++, zro--, num=1;

	printf("%lld\n",zro);

	for(int i=1;i<10;i++) printf("%lld\n",ans[i]);

	//fclose(stdin); fclose(stdout);

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

#define ll long long

int H,W,N;

ll arr[1000005];

ll ans[10];

ll d=1e9+7;

int main()

{

    scanf("%d%d%d",&H,&W,&N);

    int x,y;

    int xx,yy;

    int count=0;

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

    {

       scanf("%d%d",&x,&y);

       for(int i=-1;i<=1;i++)

       {

           for(int j=-1;j<=1;j++)

           {

               xx=x+i;

               yy=y+j;

               if(xx>1&&xx<H&&yy>1&&yy<W)

                    arr[count++]=xx*d+yy;

           }

       }

    }

    sort(arr,arr+count);

    int c=1;

    ll z=(ll)(H-2)*(ll)(W-2);

    memset(ans,0,sizeof(ans));

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

    {

        if(arr[i]==arr[i+1])

            c++;

        else

        {

            z--;

            ans[c]++;

            c=1;

        }

    }

    printf("%lld\n",z);

    for(int i=1;i<10;i++)

        printf("%lld\n",ans[i]);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}




// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

   }



}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}






// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

	}	

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}




// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;



}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
/*=============================================================================================================================/*

                                               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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

	}

}


// Optimized solution to the same problem (faster):
#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;

	}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

	}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

	}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

	}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

	}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;





}


// Optimized solution to the same problem (faster):
#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;

	}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

} 

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem: