Même la somme des lignes avec une boucle

the value stored in N=3, M=3 and the array is arr=[1,2,3],[4,5,6],[7,8,9], then the required output will be
Agreeable Alpaca