Modular Exponentiation doubt

The output for the case a = 34 , b = 8 , c = 130 is showing 1 but should be 66. Please help.

@Rooopak_Sharma hey roopak your approach is not right for the right approach you should watch this video by prateek bhaiya fast exponention.