x, y = int(0), int(0) ls1 = list(input().split(";")) ls2 = [] ls3 = [] for i in ls1: if 2 <= len(i) <= 3: #2 <= 方向(一个字母)+距离(两位以内数字) <= 3 ls2.append([i[0], i[1:]]) #将第一个表示方向的字母和后面表示距离的字符串分开 for j in range(len(ls2)): try: ls2[j][1] = int(ls2[j][1]) #将字符串('10')转换为数字(10) except: pa...