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

int key;
char s[300];

int main()
{
	scanf("%d\n",&key);
	gets(s);
	int size = strlen(s);
	for(int i = 0;i < size;i++)
	{
		if(s[i] >= 'a' && s[i] <= 'z')
		{
		 	if(s[i] - key >= 'a')
		 	{
			 	s[i] -= key;
			}
			else
			{
				int key_next = 'a' - (s[i] - key) - 1;
				s[i] = 'z' - key_next;
			}
		}
		if(s[i] >= 'A' && s[i] <= 'Z')
		{
			if(s[i] - key >= 'A')
			{
				s[i] -= key;
			}
			else
			{
				int key_next = 'A' - (s[i] - key) - 1;
				s[i] = 'Z' - key_next;
			}
		}
	}
	cout << s << endl;
	return 0;
}

0 comments

No comments so far...