406072: GYM102254 E Essay Time
Description
Cadet Yu Yi Hakusho got caught, by Captain Leitor, leaning against the wall for the $$$4^{th}$$$ time. Furious, Captain Leitor ordered Yu Yi to write an essay about why he should not lean against the wall and, as he was not in a good mood, he also said that no word with four or more letters should be repeated.
Desperate, Yu Yi wrote many lines, trying not to repeat any word but, when he finished writing, he was not so sure about it so he wrote all words on his computer. As he doesn't know how to see which words are repeated, he asked you to help him.
Write a program that, given a list of words, tells which words Yi Yu should erase.
InputThe first line contains one integer, $$$n$$$ ($$$1 \le n \le 8 \times 10^6$$$) — the number of words that Yu Yi wrote.
The next $$$n$$$ lines contains, each, one string, $$$s_i$$$ — the words Yu Yi wrote.
The words contains only lowercase English letters. The sum of the length of all words is not greater than $$$8 \times 10^6$$$.
OutputIn the first line print the number of repeated words.
In the next lines, print all repeated words in the same order they repeat, separated by spaces.
If there are no repeated words, print "SAFO" (without quotes).
ExamplesInput6 not clean bad posture clean enoughOutput
1 cleanInput
8 not clean enough bad posture clean enough enoughOutput
3 clean enough enough