Probably more than one way to do it (there always is), but I'll hint towards one way. First, think String. Second, think reverse the String.