Solution for competitive coding