Adding Solution For Word Game

http://www.hackerearth.com/problem/algorithm/problem-1/