class Solution:
    def solve(self , n: int, m: int, a: List[int]) -> List[int]:
        if m==0 or not a or len(a)==1 : return a
        for _ in range(m%n):
            mark=a.pop()
            a.insert(0,mark)
        return a