print("\n".join(map(str,[0,1,2,3,2,1,1,1])))