There is no special trick. You print a random instruction of length 100000, and if you are lucky enough your answer might get AC. Else try resubmitting a few more times to increase the chances of getting AC. There are few solutions, looking at whom you would get an idea of how to solve using random string method. The links to the solutions are as follows:

https://www.codechef.com/viewsolution/10893754

https://www.codechef.com/viewsolution/10902867

https://www.codechef.com/viewsolution/10902398

I agree with @prakhariitd and strictly recommend to solve it using proper approach (i.e. bfs + greedy).