Don't repeat yourself in Rock-Paper-Scissors
Ruby, 39 bytes

-&gt;n{(?P*n..?S*n).grep_v /[^RPS]|(.+)\1/}


This hilariously inefficient function generates all strings of length N that lie alphabetically between N Ps and N Ss, then filters out the vast majority that contain non-RPS characters. The actual squarefree check just uses a Regexp backreference: (.+)\1.

More idiomatic 65 bytes that finish in a reasonable amount of time for N=10:

-&gt;n{%w[R P S].repeated_permutation(n).map(&amp;:join).grep_v /(.+)\1/}


Edit: Saved a byte thanks to G B.