import java.util.Comparator;
import java.util.function.BiConsumer;
import java.util.stream.Stream;

class Main {
    //Stepik code: start
    public static <T> void findMinMax(
            Stream<? extends T> stream,
            Comparator<? super T> order,
            BiConsumer<? super T, ? super T> minMaxConsumer) {

        // your implementation here
    }
//Stepik code: end
}
