solve AOJ0525