puts (" B"+"A"*7+"BA"*8+"A"*72+"BA"*2)[gets.to_i]