Carlie, Samantha, Lily, and Maria ran the 400-meter relay today at the track meet. If their times were 12.8 seconds, 13.25 seconds, 12.06 seconds, and 13.12 seconds, what was their total time for the race (in seconds)?
A. 40.13 seconds
B. 39.71 seconds
C. 51.13 seconds
D. 51.23 seconds