import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int val; int n = in.nextInt(); int sums[] = new int[n]; String[] genes = new String[n]; //HashMap hm = new HashMap(); for(int genes_i=0; genes_i < n; genes_i++){ genes[genes_i] = in.next(); } int[] health = new int[n]; for(int health_i=0; health_i < n; health_i++){ health[health_i] = in.nextInt(); } /* for(int i=0;i hmap = new HashMap(); HashMap hm = new HashMap(); size = last - first +1; String[] arr = Arrays.copyOfRange(genes, first, last); //int[] newArray = Arrays.copyOfRange(oldArray, startIndex, endIndex); int[] health_arr = Arrays.copyOfRange(health, first, last); for(int i=0;i