The most important thing with regard to the names shown on your tax return, especially if you intend to electronically file, is that the input match what is shown on your Social Security card. Otherwise, your return could be rejected for a mismatch.
You will not be able to enter all four of your names into your return. Just do the best you can to match what is shown on your Social Security card, especially with regard to your first and last name.
So, try to either just enter your first and last name without any middle initial. If that does not work with electronic filing, then you could enter your first name and next middle name all in the first name field.
The IRS only looks at the first 4 letters of your LAST name, the SS# and the year of birth in order to efile ... everything else can be dead wrong. So unless you must enter all those names for some unknown reason all you need to enter is a first and last in the program. Middle initial is not required. As already mentioned you could enter your first & 2 middle names in the first name box but be aware there is a 35 character limit for your entire name so it may be reduced automatically.