private void decode() {
		for (String s : input) {
			if (reverseContext.containsKey(s)) {
				List<String> contextWordList = reverseContext.get(s);
				if (contextWordList.size() == 1) {
					output.add(contextWordList.get(0));
				} else {
					String shortest = null;
					for (String word : contextWordList) {
						if (shortest == null || word.length() < shortest.length()) {
							shortest = word;
						}
					}
					output.add(shortest + "!");
				}
			} else {
				//may able to improve performance with trie
				String appr = bfs(s);
				output.add(appr + "?");
			}
		}
	}