import java.util.*; import java.*; public class encipher { public static void main(String[] args) { for(;;){ try{ String text = ""; char znak; int num = System.in.read() - '0'; int in = System.in.read(); while(in != '\n'){ num = num * 10 + (in - '0'); in = System.in.read(); } if (num == 0) break; znak = (char)System.in.read(); while(znak != '\n') { text += znak; znak = (char)System.in.read(); } String s = encryptItBaby(text,num); System.out.println(s); }catch(Exception e){} } } private static String encryptItBaby(String text, int num) { String s = text; s = s.replace(" ",""); String ss = s; String end = ""; while(s.length() != 0 && ss.length() != end.length()) { end += s.charAt(0); for(int i=1; i= num) { if(ss.length() != end.length()){ end += s.charAt(i); } } } s = s.substring(1,s.length()); } return end.toUpperCase(); } }