import java.util.Scanner; public class Leapfrog_Bon { public static void main(String[] args) { Scanner in = new Scanner(System.in); String ed, key, s; ed = in.next(); key = in.next(); in.nextLine(); s = in.nextLine(); if (ed.equals("E")) { s = clean(s); char [] cipher = new char[s.length()]; for(int i=0; i= 0; j--) { if (cipher[j] == ' ') { if ((++count)%skip == 0) cipher[j] = s.charAt(k++); } } } goLeft = !goLeft; } for(int i=0; i= 0; j--) { if (cipher[j] != ' ') { if ((++count)%skip == 0) { plain[k++] = cipher[j]; cipher[j] = ' '; } } } } goLeft = !goLeft; } for(int i=0; i