var dictionary = Array();
for (var i = 0; i < words.length; i++) {
if (words[i] in dictionary) {
dictionary[words[i]].push(words[i-1]);
} else {
dictionary[words[i]] = Array(words[i-1]);
}
};
var dictionary = {};
dictionary[words[i]] = [words[i-1]]