One has to wonder what is that perfect build? and what of the costs.
Below maybe just a thought for few crazy possibilities,you may see a different and reasonable path better suited to your own needs.
All abilities are assumed at their highest peak so stars are at 5 and skills are at 4,achieving maximum upgrades.
-----------------------------------------
Infantry: rank Field Marshal (3370), infantry max 5 stars (1840), marching speed max (2490)
Skills: Infantry Commander (1080), bayonet charge (1120), Guerrilla (1080), surprise ( 720), supplies (1840)
This build cost is 13540 medals,a desirable upgrade is to add airforce for strikes, an additional 1320 medals to add to 5 air stars for a total of 14890 medals.
----------------------------------------
Armor: Field Marshal (3370), armor stars capability (2300), Air Force stars capability (1350), speed marching stars(2490)
Skills: armored Commander (1120), explosion (1120), Blitz (1080), steel torrent ( 1440), anti-armor warfare (1800)
This armor build configuration is to run to the bank as an expensive total of 16,070 medals.
----------------------------------------
Artillery: Field Marshal (3370), artillery capability stars (2950), marching speed stars (2490).
Skills: Artillery Commander (1120), fire coverage (1560), supplies (1840), explosion (1120), anti-armor warfare (1800)
This Custom configuration has player pull his hair for shows a total of 16,250 medals.