Oracle interview question

arrange open and close brackets