Help: Replace Help

Hello, I'm going to process some RNA sequences files. And I make a small script to reverse these sequences. However, I face a problem while it's running because of order problem. This is my file contents. ACGU GUACCGU And I wanna replace A to C, C to A, G to U, U to G. So from my point the reversed file should be viewed like this.