public class Solution { public static void main(String[] args) throws Exception { // Read strings from the console and declare an ArrayList here ArrayList<String> list =new ArrayList<String>(); BufferedReader br=new BufferedReader(new InputStreamReader(; for(int i=0;i<10;i++){ String s=br.readLine(); list.add(s); } ArrayList<String> result = doubleValues(list); // Display result System.out.println(result); } public static ArrayList<String> doubleValues(ArrayList<String> list) { //write your code here for(int i=0;i<10;i++) { list.add(i+1,list.get(i+1)); i++; } return list; } } output: one , two, two, three, three, four, four, five, five, six, six, seven, eight, nine , ten