import re s_arr = input().split(";") zb = [0, 0] # def pd(s): # # c_arr = s.split() # wz = ['A', 'D', 'W', 'S'] # if len(s) > 0 and s[0] in wz: # # print() # if len(s) == 2 and s[1].isdigit(): # return True # elif len(s) == 3 and s[1]....