import sys problem_name = str('genstr') sys.stdin = open(problem_name + ".in", "r") sys.stdout = open(problem_name+".out", "w")