Realize that the 12th fret is the same note as the open string. This is called an octave. An octave is the same note at a higher or lower pitch. The 12th fret is always the same note as the string played open. The 12th fret is usually marked by two dot inlays.
Every note after the 12th fret mirrors that of the lower end of the fretboard. The 13th fret is the same note as the 1st fret, the 14th fret is the same note as the 2nd fret and so on. Draw an imaginary line at the twelfth fret so you can see that the 12th fret up is exactly the same notes as the lower part of the fretboard.
Matching The Dot Inlays
Here you can see the guitar fretboard cut in 2 pieces. Laying them side by side you can see how they match up perfectly. On the left is the open strings and first 11 frets. On the right is the 12th fret up with is the exact same notes as the first picture. You can see how the dot inlays match perfectly.
The 3rd fret dot inlay matches the dot inlay on the 15th fret. The dot inlay on the 5th fret matches the one on the 17th fret. The dot inlay on the 7th fret matches the one on the 19th fret. The dot inlay on the 9th fret matches the one on the 21st fret.