On the Edge
If you have a square of side n then its perimeter is 4n and the number of tiles you have is n x n. This gives you 4n x n edgesto the individual tiles. These can be arranged so that they can create n different squares with n diffent colours on the edges.