[SRM605] AlienAndPassword by Yanzhe Chen