Imp - If this is not the first occurrence of the digit , use same character as used in its first occurrence
if mp [ d ] != index : NEW_LINE INDENT s = string [ mp [ d ] ] NEW_LINE DEDENT string = string + s NEW_LINE