You've started work as morse code translator. Unfortunately some of the signals aren't as distinguishable as others and there are times where a . seems indistinguishable from -. In these cases you write down a ? so that you can figure out what all the posibilities of that letter for that word are later.
Task
Write a function possibilities that will take a string word and return an array of possible characters that the morse code word could represent.
Examples with ?
? should return ['E','T']
?. should return ['I','N']
.? should return ['I','A']
?-? should return ['R','W','G','O']
// code
import java.util.List;
import java.util.Arrays;
class Challenge {
public static List possibilities( String word ) {
}
}