Need to get more analog inputs Arduino Uno
As others have said in the comments, there are probably better ways to do this.  However, if you are set on needing more analog inputs, the answer is simple: use an analog multiplexer.

You can use the 74HC4067 chip to multiplex the signals into the Arduino.  This is how it works:


16 channels go into the chip
Only one comes out
The Arduino controls the chip, telling which of the 16 channels to output


It's basically like a big switch.

In your case, you have 40 cables.  You could use 3 multiplexer chips, giving you a max of 48 total channels, multiplexed into 3 separate Arduino inputs, one for each chip.  In your software, you would rapidly scan through each multiplexer, looking for a button press on each of the 16 input signals.  Keep in mind however, that the analog multiplexer + Arduino ADC  combination is going to be far slower than a digital solution.  It takes the Arduino time to convert the analog voltage to a digital value.  In the case of a button press, you want to respond quickly.  Consider all your options before you go the way of an analog multiplexer.

Here is a relevant Arduino tutorial on the subject, using the same chip.