package yukicoder; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); String s = sc.next(); // String text = "abc"; // String data1 = ceaserEncoding(text, 3); // System.out.println(data1); // System.out.println(ceaserDecoding(data1, 3)); System.out.println(ursarEncoding(s)); } public static String ursarEncoding(String text) { String data = ""; for (int i = 0; i < text.length(); i++) { data = data + String.valueOf((char)(text.charAt(i) - (i + 1))); } return data; } public static String ceaserEncoding (String text, int no) { String data1 = ""; for (int i = 0; i < text.length(); i++) { data1 = data1 + String.valueOf((char)(text.charAt(i) + no)); } return data1; } public static String ceaserDecoding (String text, int no) { String data1 = ""; for (int i = 0; i < text.length(); i++) { data1 = data1 + String.valueOf((char)(text.charAt(i) - no)); } return data1; } }