Hackerrank - 'Tr' Command #1

Problem Statement
A description of the problem can be found on Hackerrank.

Solution

Solution also available on my GitHub.