How to obtain the name of a button dynamically?

I think it's quite professional but it's all up to you

blocks (3)