A password is encoded as a string s using the following rules:
"1"
to
"9"
map to letters
a
to
i
.
"10#"
to
"26#"
(two digits followed by
#
) map to letters
j
to
z
.
For example:
"1" -> "a"
"9" -> "i"
"10#" -> "j"
"26#" -> "z"
Task: Given the encoded string s, return the decoded lowercase string.
Input/Output
s
consisting of digits and
#
.
Constraints
1 <= len(s) <= 1000
Examples
s = "10#11#12"
→
"jkab"
s = "1326#"
→
"acz"
(Implementation note: you may need to manually parse the input string and handle # correctly.)