#C12656. Binary Anagrams
Binary Anagrams
Binary Anagrams
You are given a list of words. Your task is to find and output all words which are anagrams of the word \(binary\). Two words are anagrams if, when all letters are converted to lower-case and sorted, they are identical.
Note: The comparison is case-insensitive, and the order in which the valid words appear should be preserved in the output.
Example: For the input list ["binary", "Brainy", "RIBANY", "hello"]
, the valid words are ["binary", "Brainy", "RIBANY"]
.
inputFormat
The first line of the input contains an integer \(N\) representing the number of words. Each of the following \(N\) lines contains a single word.
outputFormat
Print all words that are anagrams of "binary" in the order they appear in the input, separated by a single space. If no such words exist, output an empty line.
## sample3
binary
Brainy
RIBANY
binary Brainy RIBANY
</p>