Chef and Periodic Sequence What is the logic to solve this problem? Let's define a periodic infinite sequence S (0-indexed) ...