solve level 1
solve level2 but without string.maketrans