Problem Statement
Given a positive integer n, reverse its digits and apply the following replacements while reversing:
- every digit
3becomes1 - every digit
6becomes2 - every digit
9becomes3
All other digits remain unchanged.
Print the transformed number.
Example: for n = 12369, reversing gives 96321, and then replacing digits produces 32121.