def book_dict(list):
	"""takes a list of strings ['a','b','c','d']
	and creates dictionary of trigrams as follows:
	{'a b': ['c'], 'b c': [d]}
	"""
	dict = {'the the': ['the']}
	
	for i in range(0, len(list)):
		if i < len(list) - 2:
			if list[i] + " " + list[ i + 1] not in dict:
				dict[ list[i] + " " + list[ i + 1] ] = [list[i+2]]
			else:
				dict[ list[i] + " " + list[ i + 1] ] = dict[ list[i] + " " + list[ i + 1] ] + [list[ i + 2 ]]
			
				
	return dict