import java.awt.Point; import java.io.*; import java.io.ObjectInputStream.GetField; import java.math.BigInteger; import java.sql.Array; import java.util.*; import java.util.jar.Attributes.Name; import java.util.logging.Level; class TestClass { static long mod ; static int[][] C; static boolean[][] G; static int Root; static int[] S; static int[] A; static int min=Integer.MAX_VALUE; static int temp; static ArrayList[] M; static class Batman{ int x; int value; int next; public Batman(int x , int value, int next){ this.x=x; this.value = value; this.next = next; } } public static double Area(double R , double r , double d){ Double part1 = r*r*Math.acos((d*d + r*r - R*R)/(2*d*r)); Double part2 = R*R*Math.acos((d*d + R*R - r*r)/(2*d*R)); Double part3 = 0.5*Math.sqrt((-d+r+R)*(d+r-R)*(d-r+R)*(d+r+R)); return (part1 + part2 - part3); } public static void main(String args[] ) throws java.lang.Exception { InputStream inputStream = System.in; InputReader in = new InputReader(inputStream); //BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //BufferedReader in = new BufferedReader(new FileReader("C:\\Users\\Sompathak\\Desktop\\yes.txt")); //Scanner in = new Scanner(new FileReader("C:\\Users\\Sompathak\\Desktop\\yes.java")); //PrintWriter pw = new PrintWriter(new FileWriter("C:\\Users\\sompathak\\Desktop\\output.txt")); //InputStream inputStream = System.in; //InputReader in = new InputReader(inputStream); //Scanner in = new Scanner(new InputStreamReader(System.in)); //Scanner in = new Scanner(new FileReader("C:\\Users\\sompatha\\Desktop\\yes.txt")); //we can we will ??? !!!!!! SOM RISES //long startTime = System.currentTimeMillis(); //long startTime = System.currentTimeMillis(); //float endTime = System.currentTimeMillis(); //float totalTime = (endTime - startTime)/(float)1000; //System.out.println(totalTime+" sec....."); //in.hasNext() int[] A = new int[26]; for(int i=0;i<26;i++) A[i] = in.nextInt(); String S = in.next(); int h=0; for(int i=0;i= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) return -1; } return buf[curChar++]; } public int nextInt() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public String readString() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } public double readDouble() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } double res = 0; while (!isSpaceChar(c) && c != '.') { if (c == 'e' || c == 'E') return res * Math.pow(10, nextInt()); if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } if (c == '.') { c = read(); double m = 1; while (!isSpaceChar(c)) { if (c == 'e' || c == 'E') return res * Math.pow(10, nextInt()); if (c < '0' || c > '9') throw new InputMismatchException(); m /= 10; res += (c - '0') * m; c = read(); } } return res * sgn; } public long readLong() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public boolean isSpaceChar(int c) { if (filter != null) return filter.isSpaceChar(c); return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public String next() { return readString(); } public interface SpaceCharFilter { public boolean isSpaceChar(int ch); } } }