Kinematic dynamo in two-dimensional chaotic flow: the initial and final stages