package shouty;

import java.util.*;

public class Shouty {
    private final int MESSAGE_RANGE = 1000;
    private Map<String, Coordinate> locations = new HashMap<String, Coordinate>();
    private Map<String, String> messages = new HashMap<String, String>();

    public void setLocation(String person, Coordinate location) {
      locations.put(person, location);
    }

    public void shout(String person, String message) {
      messages.put(person, message);
    }

    public List<String> getMessagesHeardBy(String listener) {
        List<String> messagesHeard = new ArrayList<String>();

        for (Map.Entry<String, String> entry : messages.entrySet()) {
            messagesHeard.add(entry.getValue());
        }

        return messagesHeard;
    }
}

@@ -477,21 +477,28 @@
  public 
-List%3C
+Map%3CString, 
 String%3E 
@@ -547,51 +547,61 @@
     
-List%3CString%3E messagesHeard = new ArrayList%3C
+HashMap%3CString, String%3E result = new HashMap%3CString, 
 Stri
@@ -652,17 +652,16 @@
 g%3E entry
- 
 : messag
@@ -693,26 +693,35 @@
     
-messagesHeard.add(
+result.put(entry.getKey(), 
 entr
@@ -765,21 +765,14 @@
 urn 
-messagesHeard
+result
 ;%0A  

Change the signature of getMessagesHeardBy