Yamaha interview question

A pattern was getting gem to me.