import re reg = "[ADWS]{1}[0-9]{1,2}" direct_dict = {"A": [0, -1], "D": [0, 1], "W": [1, 1], "S": [1, -1]} a = input().split(";") validated = [] for t in a: match_cur = re.match(reg, t) if match_cur != None and match_cur.group() == t: &...