class SimpleAffine {
private static int[] aValues = {1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25};
private static int[] aInvValues = {1, 9, 21, 15, 3, 19, 7, 23, 11, 5, 17, 25};
private static int val(String str, int pos) {
return str.charAt(pos) - 'A';
}