Caesar Cipher

3.3

28 votes
Problem

Caesar Cipher is one of the earliest and simplest encryption technique. To encrypt a message, we shift the alphabets of the message by a fixed position or key.

For example, if message is ABC , and we shift each character by 3 characters, we will get DEF. Here key is 3.

Given a message and key , compute its Caesar Cipher.

Input

  • First line contains t - number of test cases.
  • 2* t lines follow

First line of each test case contains k, the key of the Cipher.

Second line of each test case contains the message

Output

  • Print encrypted message for each test case in a separate line.

Constraints 1 < t <= 1000 0 < k <= 1000

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?