[SRM579] UndoHistory by Kaiyang Lv