Add solution for T9 problem