N=4**9;F=[0]*N def f(i,v): while i