Using a link list implementation, simulate the war car game. The program should read an input of several line of card values and output the winner and the number of rounds it takes.
ex. input: 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 J J J J Q Q Q Q K K K K A A A A
output: player 2 wins after 26 rounds