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

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

import java.util.stream.Collectors;

/* 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 < String, List < Integer > > map =
		        Map.of(
		                "alice" , List.of( 1 , 2 , 3 ) ,
		                "bob" , List.of( 4 , 5 , 6 ) ,
		                "paul" , List.of( 10 , 11 )
		        );
		
		List < Integer > orders = List.of( 1 , 2 , 3 , 4 , 5 , 6 , 7 );
		
		List < String > customersOfTargtedOrderIds =
		        map
		                .entrySet()
		                .stream()
		                .filter( e -> e.getValue().stream().anyMatch( orders :: contains ) )
		                .map( Map.Entry :: getKey )
		                .collect( Collectors.toList() );  // Or just `.toList()` in modern Java.
		
		System.out.println( "customersOfTargtedOrderIds = " + customersOfTargtedOrderIds );
	}
}