control 3x 7 segment single digits with 6 buttons

exactly what i'm trying to do.. except the buttons will be underneath instead of above...