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

class Ideone
{
	public static void main(String[] args) {
        Map<String, String> map = new HashMap<>();
        map.put("Пупкин", "Василий");
        map.put("Иванов", "Василий");
        map.put("Пушкин", "Александр");

        Map<String, Integer> counts = new HashMap<>();
        map.entrySet().forEach(e -> counts.put(e.getValue(),
                        counts.getOrDefault(e.getValue(), 0) + 1));
        Map<String, String> result = map.entrySet().stream()
                .filter(entry -> counts.get(entry.getValue()) == 1)
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
        System.out.println(result);
    }
}