Hydrodynamics of writing with ink