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

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

/* 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
	{
		List<String> list = Stream.of(
		        "06|20|1",
		        "11|20|2",
		        "11|20|2",
		        "07|207|6",
		        "11|207|2",
		        "07|207|6"
		).collect(Collectors.toList());
		
	    Map<String, Map<String, String>> map = list.stream()
	            .map(line -> line.split("\\|"))
	            .sorted(Comparator.comparingInt(line -> Integer.parseInt(line[2])))
	            .collect(Collectors.toMap(
	                    line -> line[1],
	                    line -> Map.of(line[0], line[2]),
	                    (low, high) -> high));
		
		System.out.println(map);
	}
}