import java.util.Scanner; /* * wrong answer solution - treats a, b, c, ... as 1, 2, 3, ..., not as 2, 3, 4, ... */ public class Leapfrog_Bon_2WA { 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