def find_terminals(grammar):
	"""
	For a given grammar, return a set of the terminal symbols.

	:param grammar: The grammar (set of productions rules).
	:return: set of terminal symbols.
	"""
	terminals = set()
	for key, val in grammar.items():
		for word_list in val:
			for word in word_list:
				if word not in grammar:
					terminals.add(word)
	return terminals