Codeeval Solution