Solved Alternating Characters from HackerRank