Method A for handwritten digit recogniion