Use string.ascii_lowercase and string.ascii_uppercase only

"string.lowercase" and "string.uppercase" were removed in Python 3,
we can use only "string.ascii_lowercase" and "string.ascii_uppercase".

Change-Id: I97ddac01af7070129ad8baf5960c841482c346a2
Closes-Bug: #1405918