Dehydration of polymer chains initiates graphene folding in water