while 1:exec"l=[x2*x%s]"%raw_input().replace("range","1 for x%s in")%(2,1);print"range(%s,%%s)"%min(l)%max(l)