/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.stream.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Map<Integer, Map<String,Integer>> input = new HashMap<>();
		Map<String,Integer> firstInnerMap = new HashMap<>();
		firstInnerMap.put("X", 11);
		firstInnerMap.put("Y", 13);
		firstInnerMap.put("Z", 15);
		input.put(1,firstInnerMap);
		Map<String,Integer> secondInnerMap = new HashMap<>();
		secondInnerMap.put("X", 12);
		secondInnerMap.put("A", 23);
		secondInnerMap.put("L", 41);
		input.put(2,secondInnerMap);
		
		Map<Integer,List<Integer>> result = input.entrySet()
												 .stream()
                								 .collect(Collectors.toMap(
                								 			e->e.getKey(),
                                          					e->new ArrayList(e.getValue().values())
                                          				 ));
                                          
        System.out.println(result);
	}
}