The local spy club have a special code which allows members into the specially hidden venue.
When the spy turns up he utters a random number into the speaker, say 11, the speaker replies 6, to which the spy answers 3. This special sequence allows the spy in.
A foreign spy discovered the location of the club but he didn't have access to the special code. During the evening he took note of the codes used by the spies who gained access with the following results:
1, 3, 5
27, 11, 6
9, 4, 4
The spy thought he had cracked the code and bravely uttered 16 into the speaker. The speaker replied 7. What was the spy's final answer?