You are probably overwriting the name, check your code.
3-4-3 is first 3 players are "DF", next 4 players are "MD", and next 3 players are "AT", right?
So if you are looping from index 0 to 9, loopindex<3 are "DF". You can use a short version of if-then-else for this, it's called ternary operator:
loopindex<3 ? "DF" : "something else"
And then nest another ternary operator inside:
(loopindex<3 ? "DF" : (loopindex<7 ? "MD" : "AT"))