pattern recognition letters if