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

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<>();
        for (String firstName : map.values()) {
            counts.put(firstName, counts.getOrDefault(firstName, 0) + 1);
        }
        Map<String, String> result = new HashMap<>();
        for (Map.Entry<String, String> entry : map.entrySet()) {
            if (counts.get(entry.getValue()) == 1) {
                result.put(entry.getKey(), entry.getValue());
            }
        }
        System.out.println(result);
    }
}