while True: try: s_list = input().split() num, k = int(s_list[0]), int(s_list[-1]) words =&n...