/* 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
	{
        List < String > inputs = List.of( "red" , "yellow" , "green" , "yellow" , "blue" , "green" , "purple" );
        List < String > expected = List.of( "red" , "yellow" , "green" , "blue" , "purple" );

		List<String> result = 
		    inputs
		    .stream()
		    .distinct()
		    .collect(
		        Collectors.toList()
		    )
		;        
        boolean success = result.equals( expected );

        System.out.println( "success = " + success );
        System.out.println( "result = " + result );
	}
}