Mmmm...I assumed the second way....but I see your point, Guest !!!
Let's assume your first way is the correct one...so we have
1 2 3 4 5 6 7 8 9 10 11 12 13
12 11 10 9 8 7 6 5 4 3 2 1
2 3 4 5 6 7 8 9 10 11 12 13
12 11 10 9 8 7 6 5 4 3 2 1
So...the first row contains 13 total digits...and every othe row will contain 12 digits
Subtracting 13 from 5000 we get 4987 digits remaiining
So 4987 / 12 = 415 * 12 + 7
So....this will be the 7 digit on the 416th row after the first one
Which will be the row 2 3 4 5 6 7 8 9 10 11 12 13
So...the 5000th digit will still = 8